Modifications in 4DGL library. Added CDU_hw_sw.h for version info. Added pins.h for hardware pin remapping
Dependencies: 4DGL-UC MODSERIAL mbed mbos
Fork of CDU_Mbed_30 by
pins.h@16:3c251cf29501, 2014-08-26 (annotated)
- Committer:
- WillemBraat
- Date:
- Tue Aug 26 14:02:48 2014 +0000
- Revision:
- 16:3c251cf29501
- Parent:
- 15:d13786882692
- Child:
- 17:b3545e9d38f7
pin.h extended with compiler directive for Hardware version 1.0 and Hardware version 2.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
WillemBraat | 16:3c251cf29501 | 1 | #ifdef HW_VERSION_1 |
WillemBraat | 16:3c251cf29501 | 2 | //NOTE: THESE PIN DEFINITIONS ARE FOR HARDWARE VERSION 1.0 |
WillemBraat | 16:3c251cf29501 | 3 | // |
WillemBraat | 16:3c251cf29501 | 4 | //********************************* |
WillemBraat | 16:3c251cf29501 | 5 | //pins in main.cpp |
WillemBraat | 16:3c251cf29501 | 6 | //********************************* |
WillemBraat | 16:3c251cf29501 | 7 | //MODSERIAL SERIAL_DEBUG(p9, p10, 512, 64); //: tx, rx |
WillemBraat | 16:3c251cf29501 | 8 | #define MODSERIAL_TX p9 |
WillemBraat | 16:3c251cf29501 | 9 | #define MODESERIAL_RX p10 |
WillemBraat | 16:3c251cf29501 | 10 | //DigitalOut alive_led(LED1); // : LED 1 on Mbed board toggles when CDU is alive |
WillemBraat | 16:3c251cf29501 | 11 | #define HEARTBEAT LED1 |
WillemBraat | 16:3c251cf29501 | 12 | |
WillemBraat | 16:3c251cf29501 | 13 | //********************************* |
WillemBraat | 16:3c251cf29501 | 14 | //pins in display.cpp |
WillemBraat | 16:3c251cf29501 | 15 | //********************************* |
WillemBraat | 16:3c251cf29501 | 16 | //DigitalOut VGA_SOURCE( p7 ); //control line for video switch between INT and EXT video |
WillemBraat | 16:3c251cf29501 | 17 | //DigitalOut VGA_SELECT( p8 ); //control line to select/deselect video switch |
WillemBraat | 16:3c251cf29501 | 18 | #define VGA_SOURCE_SELECT p7 |
WillemBraat | 16:3c251cf29501 | 19 | #define VGA_ON_OFF p8 |
WillemBraat | 16:3c251cf29501 | 20 | |
WillemBraat | 16:3c251cf29501 | 21 | //Control lines for VGA driver board |
WillemBraat | 16:3c251cf29501 | 22 | //TFT_4DGL display(p13,p14,p15); // serial tx, serial rx, reset pin |
WillemBraat | 16:3c251cf29501 | 23 | #define VGA_TX p13 |
WillemBraat | 16:3c251cf29501 | 24 | #define VGA_RX p14 |
WillemBraat | 16:3c251cf29501 | 25 | #define VGA_RESET p15 |
WillemBraat | 15:d13786882692 | 26 | |
WillemBraat | 16:3c251cf29501 | 27 | //********************************* |
WillemBraat | 16:3c251cf29501 | 28 | //pins in keyboard2.cpp |
WillemBraat | 16:3c251cf29501 | 29 | //********************************* |
WillemBraat | 16:3c251cf29501 | 30 | //CDU Keyboard communications KEYBOARD_INT |
WillemBraat | 16:3c251cf29501 | 31 | //InterruptIn CDU_KB_INT( p5 ); //Set CDU keyboard interrupt line |
WillemBraat | 16:3c251cf29501 | 32 | //I2C CDU_I2C(p28, p27); //I2C bus for keyboard/temp chip. |
WillemBraat | 16:3c251cf29501 | 33 | #define KBD_INT p5 |
WillemBraat | 16:3c251cf29501 | 34 | #define KBD_TMP_SDA p28 |
WillemBraat | 16:3c251cf29501 | 35 | #define KBD_TMP_SCL p27 |
WillemBraat | 16:3c251cf29501 | 36 | |
WillemBraat | 16:3c251cf29501 | 37 | //CDU Keyboard LEDS |
WillemBraat | 16:3c251cf29501 | 38 | #define LED_EXEC p12 |
WillemBraat | 16:3c251cf29501 | 39 | #define LED_FAIL p17 |
WillemBraat | 16:3c251cf29501 | 40 | #define LED_DSPY p18 |
WillemBraat | 16:3c251cf29501 | 41 | #define LED_MSG p19 |
WillemBraat | 16:3c251cf29501 | 42 | #define LED_OFST p20 |
WillemBraat | 16:3c251cf29501 | 43 | |
WillemBraat | 16:3c251cf29501 | 44 | //CDU background lighting |
WillemBraat | 16:3c251cf29501 | 45 | //AnalogIn BGL_POT( p16 ); //background light control potmeter |
WillemBraat | 16:3c251cf29501 | 46 | //PwmOut BGL_LED( p21 ); //PWM output background lighting |
WillemBraat | 16:3c251cf29501 | 47 | #define BACKLIGHT_SET p16 |
WillemBraat | 16:3c251cf29501 | 48 | #define BACKLIGHT_DRIVE p21 |
WillemBraat | 16:3c251cf29501 | 49 | |
WillemBraat | 16:3c251cf29501 | 50 | //DigitalOut Key_led(LED2); // : LED 2 on Mbed board toggles when CDU key is pressed |
WillemBraat | 16:3c251cf29501 | 51 | #define KEY_PRESSED LED2 |
WillemBraat | 16:3c251cf29501 | 52 | #endif |
WillemBraat | 15:d13786882692 | 53 | |
WillemBraat | 16:3c251cf29501 | 54 | |
WillemBraat | 16:3c251cf29501 | 55 | #ifdef HW_VERSION_2 |
WillemBraat | 16:3c251cf29501 | 56 | //NOTE: THESE PIN DEFINITIONS ARE FOR HARDWARE VERSION 2.0 |
WillemBraat | 16:3c251cf29501 | 57 | // |
WillemBraat | 16:3c251cf29501 | 58 | //********************************* |
WillemBraat | 16:3c251cf29501 | 59 | //pins in main.cpp |
WillemBraat | 16:3c251cf29501 | 60 | //********************************* |
WillemBraat | 16:3c251cf29501 | 61 | //MODSERIAL SERIAL_DEBUG(p9, p10, 512, 64); //: tx, rx |
WillemBraat | 16:3c251cf29501 | 62 | #define MODSERIAL_TX p9 |
WillemBraat | 16:3c251cf29501 | 63 | #define MODESERIAL_RX p10 |
WillemBraat | 16:3c251cf29501 | 64 | //DigitalOut alive_led(LED1); // : LED 1 on Mbed board toggles when CDU is alive |
WillemBraat | 16:3c251cf29501 | 65 | #define HEARTBEAT LED1 |
WillemBraat | 16:3c251cf29501 | 66 | |
WillemBraat | 16:3c251cf29501 | 67 | //********************************* |
WillemBraat | 16:3c251cf29501 | 68 | //pins in display.cpp |
WillemBraat | 16:3c251cf29501 | 69 | //********************************* |
WillemBraat | 16:3c251cf29501 | 70 | //DigitalOut VGA_SOURCE( p7 ); //control line for video switch between INT and EXT video |
WillemBraat | 16:3c251cf29501 | 71 | //DigitalOut VGA_SELECT( p8 ); //control line to select/deselect video switch |
WillemBraat | 16:3c251cf29501 | 72 | #define VGA_SOURCE_SELECT p7 |
WillemBraat | 16:3c251cf29501 | 73 | #define VGA_ON_OFF p8 |
WillemBraat | 15:d13786882692 | 74 | |
WillemBraat | 16:3c251cf29501 | 75 | //Control lines for VGA driver board |
WillemBraat | 16:3c251cf29501 | 76 | //TFT_4DGL display(p14,p13,p12); // serial tx, serial rx, reset pin |
WillemBraat | 16:3c251cf29501 | 77 | #define VGA_RESET p12 |
WillemBraat | 16:3c251cf29501 | 78 | #define VGA_RX p13 |
WillemBraat | 16:3c251cf29501 | 79 | #define VGA_TX p14 |
WillemBraat | 16:3c251cf29501 | 80 | |
WillemBraat | 16:3c251cf29501 | 81 | //********************************* |
WillemBraat | 16:3c251cf29501 | 82 | //pins in keyboard2.cpp |
WillemBraat | 16:3c251cf29501 | 83 | //********************************* |
WillemBraat | 16:3c251cf29501 | 84 | //CDU Keyboard communications KEYBOARD_INT |
WillemBraat | 16:3c251cf29501 | 85 | //InterruptIn CDU_KB_INT( p5 ); //Set CDU keyboard interrupt line |
WillemBraat | 16:3c251cf29501 | 86 | //I2C CDU_I2C(p28, p27); //I2C bus for keyboard/temp chip. |
WillemBraat | 16:3c251cf29501 | 87 | #define KBD_INT p5 |
WillemBraat | 16:3c251cf29501 | 88 | #define KBD_TMP_SDA p28 |
WillemBraat | 16:3c251cf29501 | 89 | #define KBD_TMP_SCL p27 |
WillemBraat | 15:d13786882692 | 90 | |
WillemBraat | 16:3c251cf29501 | 91 | //CDU Keyboard LEDS |
WillemBraat | 16:3c251cf29501 | 92 | #define LED_EXEC p25 |
WillemBraat | 16:3c251cf29501 | 93 | #define LED_FAIL p24 |
WillemBraat | 16:3c251cf29501 | 94 | #define LED_DSPY p23 |
WillemBraat | 16:3c251cf29501 | 95 | #define LED_MSG p22 |
WillemBraat | 16:3c251cf29501 | 96 | #define LED_OFST p21 |
WillemBraat | 15:d13786882692 | 97 | |
WillemBraat | 16:3c251cf29501 | 98 | //CDU background lighting |
WillemBraat | 16:3c251cf29501 | 99 | //AnalogIn BGL_POT( p15 ); //background light control potmeter |
WillemBraat | 16:3c251cf29501 | 100 | //PwmOut BGL_LED( p26 ); //PWM output background lighting |
WillemBraat | 16:3c251cf29501 | 101 | #define BACKLIGHT_SET p15 |
WillemBraat | 16:3c251cf29501 | 102 | #define BACKLIGHT_DRIVE p26 |
WillemBraat | 15:d13786882692 | 103 | |
WillemBraat | 16:3c251cf29501 | 104 | //DigitalOut Key_led(LED2); // : LED 2 on Mbed board toggles when CDU key is pressed |
WillemBraat | 16:3c251cf29501 | 105 | #define KEY_PRESSED LED2 |
WillemBraat | 16:3c251cf29501 | 106 | #endif |