Skip to content

Commit

Permalink
m2 ifdefs / gps dev
Browse files Browse the repository at this point in the history
  • Loading branch information
olikraus committed Jan 19, 2014
1 parent 393ceea commit a7ff727
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/M2tk.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
*/

#ifndef _M2TK_H
#define _M2TK_H

#include "m2.h"

class M2tk
Expand All @@ -43,3 +46,5 @@ class M2tk
m2_rom_void_p getRoot() { return m2_GetRoot(); }
};

#endif

4 changes: 4 additions & 0 deletions sys/arm_u8g/gps/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,9 @@
*/
#define USE_GPS_4800BAUD

/*
Define this to generate a LOW_HIGH_LOW Pulse on PIO1_5
*/
#define USE_LOW_HIGH_LOW_PULSE

#endif
12 changes: 12 additions & 0 deletions sys/arm_u8g/gps/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "uart.h"
#include "init.h"
#include "exmem.h"
#include "config.h"


/*========================================================================*/
Expand Down Expand Up @@ -224,6 +225,17 @@ void gps_init(void)
/* init uart, connect uart to gps parser */
UART_Init(1, gps_rx);

#ifdef USE_LOW_HIGH_LOW_PULSE
/* generate high pulse on PIO1_5 */
set_gpio_mode(PIN(1,5), 1, 0);

set_gpio_level(PIN(1,5), 0);
delay_micro_seconds(1*1000*1000); /* wait 1 second */
set_gpio_level(PIN(1,5), 1);
delay_micro_seconds(200*1000); /* wait 200ms second */
set_gpio_level(PIN(1,5), 0);
#endif

/* check for external memory */
check_ExternalMemory();

Expand Down

0 comments on commit a7ff727

Please sign in to comment.