 #define MENU_BG2            ILI9341_BLACK
 #define MENU_FG             ILI9341_BLACK
 
+// touchscreen stuff
+int ts_rotation = 0;
+int ts_width = SCREEN_WIDTH;
+int ts_height = SCREEN_HEIGHT;
+
 // the VFO states
 enum VFOState
 {


void keypad_button_draw(char ch, int x, int y)
{
  tft.drawRoundRect(KEYPAD_X+KEYPAD_MARGIN+(KEYPAD_MARGIN+KEYPAD_BUTTON_W)*x,
                    KEYPAD_Y+KEYPAD_MARGIN+(KEYPAD_MARGIN+KEYPAD_BUTTON_H)*y,
                    KEYPAD_BUTTON_H, KEYPAD_BUTTON_H,

#define TFT_CS      10
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);  

// constants for main screen layout
#define NUM_F_CHAR            8     // number digits in frequency display
#define CHAR_WIDTH            27    // width of each frequency digit
#define DEPTH_FREQ_DISPLAY    50    // depth of frequency display bar
#define FREQ_OFFSET_Y         40    // offset from top of frequency digits
#define FREQ_OFFSET_X         40    // offset from left of frequency digits
#define MHZ_OFFSET_X          257   // offset from left of the 'Hz' units

// display constants - offsets, colours, etc
#define FONT_FREQ           (&FreeSansBold24pt7b) // font for frequency display
#define FONT_BUTTON         (&FreeSansBold12pt7b) // font for button labels

// various colours
#define ILI9341_LIGHTGREY   0xC618      /* 192, 192, 192 */
#define ILI9341_DARKGREY    0x7BEF      /* 128, 128, 128 */

