A porting of a GPS decoding and presenting program within the mbos RTOS. It is not a definitive application but a study program to test NMEA full decoding library and a first approach to an RTOS. Many thanks to Andrew Levido for his support and his patience on teaching me the RTOS principles from the other side of the Earth. It uses NMEA library by Tim (xtimor@gmail.com) ported by Ken Todotani (http://mbed.org/users/todotani/) on public mbed library (http://mbed.org/users/todotani/programs/GPS_nmeaLib/5yo4h) also available, as original universal C library, on http://nmea.sourceforge.net

Dependencies:   mbos Watchdog TextLCD mbed ConfigFile

Committer:
guiott
Date:
Sun Jan 29 16:06:12 2012 +0000
Revision:
0:d177c0087d1f
Child:
2:8917036cbf69

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
guiott 0:d177c0087d1f 1 // tasks -------------------------------
guiott 0:d177c0087d1f 2
guiott 0:d177c0087d1f 3 // Task 1 - GPS Serial Task
guiott 0:d177c0087d1f 4 #define GPS_SERIAL_TASK 1
guiott 0:d177c0087d1f 5 #define GPS_SER_PRIORITY 50
guiott 0:d177c0087d1f 6 #define GPS_SER_STACK_SZ 2048
guiott 0:d177c0087d1f 7 void GpsSerialTask(void);
guiott 0:d177c0087d1f 8
guiott 0:d177c0087d1f 9 // Task 2 - Keypad read
guiott 0:d177c0087d1f 10 #define KEYPAD_TASK 2
guiott 0:d177c0087d1f 11 #define KEYPAD_PRIORITY 50
guiott 0:d177c0087d1f 12 #define KEYPAD_STACK_SZ 256
guiott 0:d177c0087d1f 13 void KeypadTask(void);
guiott 0:d177c0087d1f 14
guiott 0:d177c0087d1f 15 // Task 3 - Show LCD
guiott 0:d177c0087d1f 16 #define SHOW_LCD_TASK 3
guiott 0:d177c0087d1f 17 #define SHOW_LCD_PRIORITY 50
guiott 0:d177c0087d1f 18 #define SHOW_LCD_STACK_SZ 256
guiott 0:d177c0087d1f 19 void ShowLcdTask(void);
guiott 0:d177c0087d1f 20
guiott 0:d177c0087d1f 21 // Task 4 - Led Blink
guiott 0:d177c0087d1f 22 #define LED_BLINK_TASK 4
guiott 0:d177c0087d1f 23 #define LED_BLINK_PRIORITY 50
guiott 0:d177c0087d1f 24 #define LED_BLINK_STACK_SZ 256
guiott 0:d177c0087d1f 25 void LedBlinkTask(void);
guiott 0:d177c0087d1f 26
guiott 0:d177c0087d1f 27 // Task 5 - Set Time
guiott 0:d177c0087d1f 28 #define SET_TIME_TASK 5
guiott 0:d177c0087d1f 29 #define SET_TIME_PRIORITY 50
guiott 0:d177c0087d1f 30 #define SET_TIME_STACK_SZ 256
guiott 0:d177c0087d1f 31 void SetTimeTask(void);
guiott 0:d177c0087d1f 32
guiott 0:d177c0087d1f 33 // Task 6 - Show PC
guiott 0:d177c0087d1f 34 #define SHOW_PC_TASK 6
guiott 0:d177c0087d1f 35 #define SHOW_PC_PRIORITY 50
guiott 0:d177c0087d1f 36 #define SHOW_PC_STACK_SZ 512
guiott 0:d177c0087d1f 37 void ShowPcTask(void);
guiott 0:d177c0087d1f 38
guiott 0:d177c0087d1f 39 // Task 7 - LCD backlight dim
guiott 0:d177c0087d1f 40 #define LCD_LIGHT_DIM_TASK 7
guiott 0:d177c0087d1f 41 #define LCD_LIGHT_DIM_PRIORITY 50
guiott 0:d177c0087d1f 42 #define LCD_LIGHT_DIM_STACK_SZ 256
guiott 0:d177c0087d1f 43 void LcdLightDimTask(void);
guiott 0:d177c0087d1f 44
guiott 0:d177c0087d1f 45 // Task 8 - Temp task used for tests
guiott 0:d177c0087d1f 46 #define TEMP_TASK 8
guiott 0:d177c0087d1f 47 #define TEMP_PRIORITY 50
guiott 0:d177c0087d1f 48 #define TEMP_STACK_SZ 32
guiott 0:d177c0087d1f 49 void TempTask(void);
guiott 0:d177c0087d1f 50
guiott 0:d177c0087d1f 51 #define NUM_TASKS 8
guiott 0:d177c0087d1f 52
guiott 0:d177c0087d1f 53 // timers ------------------------------
guiott 0:d177c0087d1f 54 #define KEYPAD_TMR 0
guiott 0:d177c0087d1f 55 #define SHOW_LCD_TMR 1
guiott 0:d177c0087d1f 56 #define LED_BLINK_TMR 2
guiott 0:d177c0087d1f 57 #define SET_TIME_TMR 3
guiott 0:d177c0087d1f 58 #define SHOW_PC_TMR 4
guiott 0:d177c0087d1f 59 #define LCD_LIGHT_DIM_OFF_TMR 5
guiott 0:d177c0087d1f 60 #define TEMP_TMR 6
guiott 0:d177c0087d1f 61
guiott 0:d177c0087d1f 62 #define NUM_TIMERS 7
guiott 0:d177c0087d1f 63
guiott 0:d177c0087d1f 64 // resources ---------------------------
guiott 0:d177c0087d1f 65 #define PC_SERIAL 0
guiott 0:d177c0087d1f 66 #define PC_SERIAL_PRIO 70
guiott 0:d177c0087d1f 67
guiott 0:d177c0087d1f 68 #define GPS_SERIAL 1
guiott 0:d177c0087d1f 69 #define GPS_SERIAL_PRIO 70
guiott 0:d177c0087d1f 70
guiott 0:d177c0087d1f 71 #define LCD 2
guiott 0:d177c0087d1f 72 #define LCD_PRIO 70
guiott 0:d177c0087d1f 73
guiott 0:d177c0087d1f 74 #define LCD_LIGHT_DIM 3
guiott 0:d177c0087d1f 75 #define LCD_LIGHT_DIM_PRIO 70
guiott 0:d177c0087d1f 76
guiott 0:d177c0087d1f 77 #define NUM_RESOURCES 4
guiott 0:d177c0087d1f 78
guiott 0:d177c0087d1f 79 // Events ------------------------------
guiott 0:d177c0087d1f 80 #define GPS_SERIAL_IN_EVT 0x00000001
guiott 0:d177c0087d1f 81 #define KEYPAD_EVT 0x00000002
guiott 0:d177c0087d1f 82 #define SHOW_LCD_EVT 0x00000004
guiott 0:d177c0087d1f 83 #define LED_BLINK_EVT 0x00000008
guiott 0:d177c0087d1f 84 #define SET_TIME_EVT 0x00000010
guiott 0:d177c0087d1f 85 #define SHOW_PC_EVT 0x00000020
guiott 0:d177c0087d1f 86 #define LCD_LIGHT_DIM_ON_EVT 0x00000040
guiott 0:d177c0087d1f 87 #define LCD_LIGHT_DIM_OFF_EVT 0x00000080
guiott 0:d177c0087d1f 88 #define TEMP_EVT 0x00000100
guiott 0:d177c0087d1f 89