telemetrum-v1.1 telemetrum-v1.0 \
teledongle-v0.2 teledongle-v0.1 \
telemini-v0.1 telenano-v0.1 \
+ telebt-v0.0 \
telemetrum-v0.1-sky telemetrum-v0.1-sirf \
tidongle test
#
SIRF_DRIVER_SRC = \
ao_gps_sirf.c
+
#
# Skytraq driver source
#
SKY_DRIVER_SRC = \
ao_gps_skytraq.c
+
+#
+# BTM-182 driver source
+#
+BTM_DRIVER_SRC = \
+ ao_btm.c
+
#
# Tasks run on TeleMetrum
#
$(TNANO_TASK_SRC) \
$(TNANO_MAIN_SRC)
+#
+# Sources for TeleDongle
+#
+
+TBT_MAIN_SRC = \
+ ao_telebt.c
+
+TBT_BASE_SRC = \
+ $(ALTOS_SRC) \
+ $(ALTOS_DRIVER_SRC) \
+ $(TELE_RECEIVER_SRC) \
+ $(TELE_COMMON_SRC) \
+ $(SERIAL_DRIVER_SRC) \
+ $(USB_DRIVER_SRC) \
+ $(BTM_DRIVER_SRC) \
+ $(DBG_SRC) \
+ $(TBT_MAIN_SRC)
+
#
# TI Dongle sources
#
void
ao_cmd_init(void);
+#if HAS_CMD_FILTER
+/*
+ * Provided by an external module to filter raw command lines
+ */
+uint8_t
+ao_cmd_filter(void);
+#endif
+
/*
* ao_dma.c
*/
#endif
#if HAS_SERIAL_1
+#ifndef USE_SERIAL_STDIN
+#error Please define USE_SERIAL_STDIN
+#endif
+
void
ao_serial_rx1_isr(void) __interrupt 3;
char
ao_serial_getchar(void) __critical;
+#if USE_SERIAL_STDIN
+char
+ao_serial_pollchar(void) __critical;
+
+void
+ao_serial_set_stdin(uint8_t stdin);
+#endif
+
void
ao_serial_putchar(char c) __critical;
+void
+ao_serial_drain(void) __critical;
+
#define AO_SERIAL_SPEED_4800 0
#define AO_SERIAL_SPEED_9600 1
-#define AO_SERIAL_SPEED_57600 2
+#define AO_SERIAL_SPEED_19200 2
+#define AO_SERIAL_SPEED_57600 3
void
ao_serial_set_speed(uint8_t speed);
char (*pollchar)(void);
void (*putchar)(char c) __reentrant;
void (*flush)(void);
+ uint8_t echo;
};
+extern __xdata struct ao_stdio ao_stdios[];
+extern __data int8_t ao_cur_stdio;
+extern __data int8_t ao_num_stdios;
+
void
flush(void);
extern __xdata uint8_t ao_stdin_ready;
+uint8_t
+ao_echo(void);
+
void
ao_add_stdio(char (*pollchar)(void),
void (*putchar)(char) __reentrant,
void
ao_packet_slave_init(uint8_t enable);
+/* ao_btm.c */
+
+void
+ao_btm_init(void);
+
#endif /* _AO_H_ */
--- /dev/null
+/*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include "ao.h"
+
+uint8_t ao_btm_running;
+uint8_t ao_btm_stdio;
+__xdata uint8_t ao_btm_connected;
+uint8_t ao_btm_chat;
+
+__xdata char ao_btm_buffer[1024];
+int ao_btm_ptr;
+
+#define AO_BTM_MAX_REPLY 16
+__xdata char ao_btm_reply[AO_BTM_MAX_REPLY];
+
+extern volatile __xdata struct ao_fifo ao_usart1_rx_fifo;
+
+/*
+ * Read a line of data from the serial port, truncating
+ * it after a few characters.
+ */
+
+uint8_t
+ao_btm_get_line(void)
+{
+ uint8_t ao_btm_reply_len = 0;
+ char c;
+
+ for (;;) {
+
+ while ((c = ao_serial_pollchar()) != AO_READ_AGAIN) {
+ if (ao_btm_reply_len < sizeof (ao_btm_reply))
+ ao_btm_reply[ao_btm_reply_len++] = c;
+ if (ao_btm_ptr < sizeof (ao_btm_buffer))
+ ao_btm_buffer[ao_btm_ptr++] = c;
+ if (c == '\r' || c == '\n')
+ goto done;
+ }
+ for (c = 0; c < 10; c++) {
+ ao_delay(AO_MS_TO_TICKS(10));
+ if (!ao_fifo_empty(ao_usart1_rx_fifo))
+ break;
+ }
+ if (c == 10)
+ goto done;
+ }
+done:
+ for (c = ao_btm_reply_len; c < sizeof (ao_btm_reply);)
+ ao_btm_reply[c++] = '\0';
+ return ao_btm_reply_len;
+}
+
+/*
+ * Drain the serial port completely
+ */
+void
+ao_btm_drain()
+{
+ while (ao_btm_get_line())
+ ;
+}
+
+void
+ao_btm_echo(uint8_t echo)
+{
+ ao_stdios[ao_btm_stdio].echo = echo;
+}
+
+/*
+ * A command line pre-processor to detect connect/disconnect messages
+ * and update the internal state
+ */
+
+uint8_t
+ao_cmd_filter(void)
+{
+ ao_cmd_lex();
+ while (ao_cmd_lex_c != '\n') {
+ if (ao_match_word("CONNECT")) {
+ ao_btm_connected = 1;
+ ao_btm_echo(1);
+ ao_wakeup(&ao_btm_connected);
+ return 1;
+ }
+ if (ao_match_word("DISCONNECT")) {
+ ao_btm_connected = 0;
+ ao_btm_echo(0);
+ ao_wakeup(&ao_btm_connected);
+ return 1;
+ }
+ if (ao_match_word("ERROR"))
+ return 1;
+ if (ao_match_word("OK"))
+ return 1;
+ ao_cmd_lex();
+ }
+ ao_cmd_status = 0;
+ return !ao_btm_connected;
+}
+
+/*
+ * A wrapper for ao_serial_pollchar that
+ * doesn't return any characters while we're
+ * initializing the bluetooth device
+ */
+char
+ao_btm_pollchar(void)
+{
+ char c;
+ if (!ao_btm_running)
+ return AO_READ_AGAIN;
+ c = ao_serial_pollchar();
+ if (c != AO_READ_AGAIN)
+ if (ao_btm_ptr < sizeof (ao_btm_buffer))
+ ao_btm_buffer[ao_btm_ptr++] = c;
+ return c;
+}
+
+/*
+ * Wait for the bluetooth device to return
+ * status from the previously executed command
+ */
+uint8_t
+ao_btm_wait_reply(void)
+{
+ for (;;) {
+ ao_btm_get_line();
+ if (!strcmp(ao_btm_reply, "OK"))
+ return 1;
+ if (!strcmp(ao_btm_reply, "ERROR"))
+ return -1;
+ if (ao_btm_reply[0] == '\0')
+ return 0;
+ }
+}
+
+void
+ao_btm_cmd(__code char *cmd)
+{
+ ao_cur_stdio = ao_btm_stdio;
+ printf(cmd);
+ ao_btm_wait_reply();
+}
+
+/*
+ * A thread to initialize the bluetooth device and
+ * hang around to blink the LED when connected
+ */
+void
+ao_btm(void)
+{
+ ao_serial_set_speed(AO_SERIAL_SPEED_19200);
+ ao_add_stdio(ao_btm_pollchar,
+ ao_serial_putchar,
+ NULL);
+ ao_btm_stdio = ao_num_stdios - 1;
+ ao_cur_stdio = ao_btm_stdio;
+ ao_btm_echo(0);
+ ao_btm_drain();
+ ao_delay(AO_SEC_TO_TICKS(1));
+ printf("+++");
+ ao_btm_drain();
+ ao_delay(AO_SEC_TO_TICKS(1));
+ printf("\r");
+ ao_btm_drain();
+ ao_btm_cmd("ATQ0\r");
+ ao_btm_cmd("ATE0\r");
+ ao_btm_cmd("ATH\r");
+ ao_delay(AO_SEC_TO_TICKS(1));
+ ao_btm_cmd("ATC0\r");
+ ao_btm_cmd("ATL4\r");
+ ao_serial_set_speed(AO_SERIAL_SPEED_57600);
+ ao_btm_drain();
+ printf("ATN=TeleBT-%d\r", ao_serial_number);
+ ao_btm_wait_reply();
+ ao_btm_running = 1;
+ for (;;) {
+ while (!ao_btm_connected && !ao_btm_chat)
+ ao_sleep(&ao_btm_connected);
+ if (ao_btm_chat) {
+ ao_btm_running = 0;
+ while (ao_btm_chat) {
+ char c;
+ c = ao_serial_pollchar();
+ if (c != AO_READ_AGAIN)
+ ao_usb_putchar(c);
+ else {
+ ao_usb_flush();
+ ao_sleep(&ao_usart1_rx_fifo);
+ }
+ }
+ ao_btm_running = 1;
+ }
+ while (ao_btm_connected) {
+ ao_led_for(AO_LED_GREEN, AO_MS_TO_TICKS(20));
+ ao_delay(AO_SEC_TO_TICKS(3));
+ }
+ }
+}
+
+__xdata struct ao_task ao_btm_task;
+
+/*
+ * Connect directly to the bluetooth device, mostly
+ * useful for testing
+ */
+static void
+ao_btm_forward(void)
+{
+ char c;
+
+ ao_btm_chat = 1;
+ ao_wakeup(&ao_btm_connected);
+ ao_usb_flush();
+ while ((c = ao_usb_getchar()) != '~') {
+ if (c == '\n') c = '\r';
+ ao_serial_putchar(c);
+ }
+ ao_btm_chat = 0;
+ while (!ao_btm_running) {
+ ao_wakeup(&ao_usart1_rx_fifo);
+ ao_delay(AO_MS_TO_TICKS(10));
+ }
+}
+
+/*
+ * Dump everything received from the bluetooth device during startup
+ */
+static void
+ao_btm_dump(void)
+{
+ int i;
+
+ for (i = 0; i < ao_btm_ptr; i++)
+ putchar(ao_btm_buffer[i]);
+ putchar('\n');
+}
+
+__code struct ao_cmds ao_btm_cmds[] = {
+ { ao_btm_forward, "B\0BTM serial link." },
+ { ao_btm_dump, "d\0Dump btm buffer." },
+ { 0, NULL },
+};
+
+void
+ao_btm_init (void)
+{
+ ao_serial_init();
+ ao_serial_set_speed(AO_SERIAL_SPEED_19200);
+ ao_add_task(&ao_btm_task, ao_btm, "bt");
+ ao_cmd_register(&ao_btm_cmds[0]);
+}
__xdata uint32_t ao_cmd_lex_u32;
__xdata char ao_cmd_lex_c;
__xdata enum ao_cmd_status ao_cmd_status;
-static __xdata uint8_t lex_echo;
#define CMD_LEN 32
readline(void)
{
__xdata char c;
- if (lex_echo)
+ if (ao_echo())
put_string("> ");
cmd_len = 0;
for (;;) {
/* backspace/delete */
if (c == '\010' || c == '\177') {
if (cmd_len != 0) {
- if (lex_echo)
+ if (ao_echo())
put_string("\010 \010");
--cmd_len;
}
/* ^U */
if (c == '\025') {
while (cmd_len != 0) {
- if (lex_echo)
+ if (ao_echo())
put_string("\010 \010");
--cmd_len;
}
c = '\n';
if (c == '\n') {
- if (lex_echo)
+ if (ao_echo())
putchar('\n');
break;
}
if (cmd_len >= CMD_LEN - 2) {
- if (lex_echo)
+ if (ao_echo())
putchar('\007');
continue;
}
cmd_line[cmd_len++] = c;
- if (lex_echo)
+ if (ao_echo())
putchar(c);
}
cmd_line[cmd_len++] = '\n';
echo(void)
{
ao_cmd_hex();
- lex_echo = ao_cmd_lex_i != 0;
+ if (ao_cmd_status == ao_cmd_success)
+ ao_stdios[ao_cur_stdio].echo = ao_cmd_lex_i != 0;
}
static void
__code struct ao_cmds * __xdata cs;
void (*__xdata func)(void);
- lex_echo = 1;
for (;;) {
readline();
+#if HAS_CMD_FILTER
+ if (ao_cmd_filter())
+ continue;
+ cmd_i = 0;
+#endif
ao_cmd_lex();
ao_cmd_white();
c = ao_cmd_lex_c;
break;
if (ao_packet_master_sleeping)
ao_wakeup(&ao_packet_master_sleeping);
- ao_usb_flush();
+ flush();
ao_sleep(&ao_stdin_ready);
}
return c;
while (ao_packet_enable) {
c = ao_packet_getchar();
if (c != AO_READ_AGAIN)
- ao_usb_putchar(c);
+ putchar(c);
}
ao_exit();
}
ao_set_monitor(0);
ao_add_task(&ao_packet_task, ao_packet_master, "master");
ao_add_task(&ao_packet_echo_task, ao_packet_echo, "echo");
- while ((c = ao_usb_getchar()) != '~') {
+ while ((c = getchar()) != '~') {
if (c == '\r') c = '\n';
ao_packet_putchar(c);
}
#define HAS_GPS 1
#define HAS_SERIAL_1 1
#define HAS_ADC 1
+ #define USE_SERIAL_STDIN 0
#define HAS_EEPROM 1
#define USE_INTERNAL_FLASH 0
#define HAS_DBG 1
#define HAS_BEEP 1
#define HAS_GPS 1
#define HAS_SERIAL_1 1
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 1
#define HAS_EEPROM 1
#define USE_INTERNAL_FLASH 0
#define HAS_USB 1
#define HAS_BEEP 0
#define HAS_SERIAL_1 0
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 0
#define HAS_DBG 1
#define HAS_EEPROM 0
#define HAS_BEEP 0
#define HAS_GPS 0
#define HAS_SERIAL_1 0
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 1
#define HAS_EEPROM 1
#define USE_INTERNAL_FLASH 1
#define HAS_BEEP 0
#define HAS_GPS 0
#define HAS_SERIAL_1 0
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 1
#define HAS_EEPROM 1
#define USE_INTERNAL_FLASH 1
#define HAS_BEEP 1
#define HAS_GPS 1
#define HAS_SERIAL_1 1
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 1
#define HAS_DBG 0
#define HAS_EEPROM 1
#define HAS_USB 1
#define HAS_BEEP 0
#define HAS_SERIAL_1 0
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 0
#define HAS_DBG 0
#define HAS_EEPROM 0
#define HAS_USB 1
#define HAS_BEEP 0
#define HAS_SERIAL_1 0
+ #define USE_SERIAL_STDIN 0
#define HAS_ADC 0
#define HAS_DBG 1
#define HAS_EEPROM 0
#define HAS_IGNITE 0
#endif
+#if defined(TELEBT_V_0_0)
+ #define HAS_FLIGHT 0
+ #define HAS_USB 1
+ #define HAS_BEEP 0
+ #define HAS_SERIAL_1 1
+ #define USE_SERIAL_STDIN 1
+ #define HAS_CMD_FILTER 1
+ #define HAS_ADC 0
+ #define HAS_DBG 1
+ #define HAS_EEPROM 0
+ #define DBG_ON_P1 0
+ #define DBG_ON_P0 1
+ #define IGNITE_ON_P2 0
+ #define IGNITE_ON_P0 0
+ #define PACKET_HAS_MASTER 1
+ #define PACKET_HAS_SLAVE 0
+ #define AO_LED_RED 2
+ #define AO_LED_GREEN 1
+ #define LEDS_AVAILABLE (AO_LED_RED|AO_LED_GREEN)
+ #define SPI_CS_ON_P1 1
+ #define SPI_CS_ON_P0 0
+ #define HAS_IGNITE 0
+#endif
+
#if DBG_ON_P1
#define DBG_CLOCK (1 << 4) /* mi0 */
#error Please define HAS_SERIAL_1
#endif
+#ifndef USE_SERIAL_STDIN
+#error Please define USE_SERIAL_STDIN
+#endif
+
#ifndef HAS_ADC
#error Please define HAS_ADC
#endif
if (!ao_fifo_full(ao_usart1_rx_fifo))
ao_fifo_insert(ao_usart1_rx_fifo, U1DBUF);
ao_wakeup(&ao_usart1_rx_fifo);
+#if USE_SERIAL_STDIN
+ ao_wakeup(&ao_stdin_ready);
+#endif
}
static __xdata uint8_t ao_serial_tx1_started;
ao_wakeup(&ao_usart1_tx_fifo);
}
-static __pdata serial_echo;
-
char
ao_serial_getchar(void) __critical
{
while (ao_fifo_empty(ao_usart1_rx_fifo))
ao_sleep(&ao_usart1_rx_fifo);
ao_fifo_remove(ao_usart1_rx_fifo, c);
- if (serial_echo) {
- printf("%02x ", ((int) c) & 0xff);
- if (c >= ' ')
- putchar(c);
- putchar('\n');
- flush();
- }
return c;
}
+#if USE_SERIAL_STDIN
+char
+ao_serial_pollchar(void) __critical
+{
+ char c;
+ if (ao_fifo_empty(ao_usart1_rx_fifo))
+ return AO_READ_AGAIN;
+ ao_fifo_remove(ao_usart1_rx_fifo,c);
+ return c;
+}
+#endif
+
void
ao_serial_putchar(char c) __critical
{
ao_serial_tx1_start();
}
-static void
+void
ao_serial_drain(void) __critical
{
while (!ao_fifo_empty(ao_usart1_tx_fifo))
ao_sleep(&ao_usart1_tx_fifo);
}
-static void
-monitor_serial(void)
-{
- ao_cmd_hex();
- serial_echo = ao_cmd_lex_i != 0;
-}
-
-__code struct ao_cmds ao_serial_cmds[] = {
- { monitor_serial, "M <enable>\0Monitor serial data" },
- { 0, NULL },
-};
-
static const struct {
uint8_t baud;
uint8_t gcr;
/* .baud = */ 163,
/* .gcr = */ (8 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
},
+ /* [AO_SERIAL_SPEED_19200] = */ {
+ /* .baud = */ 163,
+ /* .gcr = */ (9 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
+ },
/* [AO_SERIAL_SPEED_57600] = */ {
/* .baud = */ 59,
/* .gcr = */ (11 << UxGCR_BAUD_E_SHIFT) | UxGCR_ORDER_LSB
ao_serial_drain();
if (speed > AO_SERIAL_SPEED_57600)
return;
+ U1UCR |= UxUCR_FLUSH;
U1BAUD = ao_serial_speeds[speed].baud;
U1GCR = ao_serial_speeds[speed].gcr;
}
/* Set up the USART pin assignment */
PERCFG = (PERCFG & ~PERCFG_U1CFG_ALT_MASK) | PERCFG_U1CFG_ALT_2;
- /* ee has already set the P2SEL bits */
+ P2SEL = (P2SEL & ~(P2SEL_PRI3P1_MASK | P2SEL_PRI2P1_MASK)) |
+ (P2SEL_PRI3P1_USART1 | P2SEL_PRI2P1_USART1);
/* Make the USART pins be controlled by the USART */
P1SEL |= (1 << 6) | (1 << 7);
/* Reasonable serial parameters */
U1UCR = (UxUCR_FLUSH |
UxUCR_FLOW_DISABLE |
- UxUCR_D9_ODD_PARITY |
+ UxUCR_D9_EVEN_PARITY |
UxUCR_BIT9_8_BITS |
UxUCR_PARITY_DISABLE |
UxUCR_SPB_1_STOP_BIT |
IEN0 |= IEN0_URX1IE;
IEN2 |= IEN2_UTX1IE;
-
- ao_cmd_register(&ao_serial_cmds[0]);
}
* Basic I/O functions to support SDCC stdio package
*/
-#define AO_NUM_STDIOS 2
+#define AO_NUM_STDIOS (HAS_USB + PACKET_HAS_SLAVE + USE_SERIAL_STDIN)
-static __xdata struct ao_stdio stdios[AO_NUM_STDIOS];
-static __data int8_t ao_cur_stdio;
-static __data int8_t ao_num_stdios;
+__xdata struct ao_stdio ao_stdios[AO_NUM_STDIOS];
+__data int8_t ao_cur_stdio;
+__data int8_t ao_num_stdios;
void
putchar(char c)
{
if (c == '\n')
- (*stdios[ao_cur_stdio].putchar)('\r');
- (*stdios[ao_cur_stdio].putchar)(c);
+ (*ao_stdios[ao_cur_stdio].putchar)('\r');
+ (*ao_stdios[ao_cur_stdio].putchar)(c);
}
void
flush(void)
{
- if (stdios[ao_cur_stdio].flush)
- stdios[ao_cur_stdio].flush();
+ if (ao_stdios[ao_cur_stdio].flush)
+ ao_stdios[ao_cur_stdio].flush();
}
__xdata uint8_t ao_stdin_ready;
int8_t stdio = ao_cur_stdio;
for (;;) {
- c = stdios[stdio].pollchar();
+ c = ao_stdios[stdio].pollchar();
if (c != AO_READ_AGAIN)
break;
if (++stdio == ao_num_stdios)
return c;
}
+uint8_t
+ao_echo(void)
+{
+ return ao_stdios[ao_cur_stdio].echo;
+}
+
void
ao_add_stdio(char (*pollchar)(void),
void (*putchar)(char),
{
if (ao_num_stdios == AO_NUM_STDIOS)
ao_panic(AO_PANIC_STDIO);
- stdios[ao_num_stdios].pollchar = pollchar;
- stdios[ao_num_stdios].putchar = putchar;
- stdios[ao_num_stdios].flush = flush;
+ ao_stdios[ao_num_stdios].pollchar = pollchar;
+ ao_stdios[ao_num_stdios].putchar = putchar;
+ ao_stdios[ao_num_stdios].flush = flush;
+ ao_stdios[ao_num_stdios].echo = 1;
ao_num_stdios++;
}
--- /dev/null
+/*
+ * Copyright © 2011 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+#include "ao.h"
+
+void
+main(void)
+{
+ ao_clock_init();
+
+ /* Turn on the LED until the system is stable */
+ ao_led_init(LEDS_AVAILABLE);
+ ao_led_on(AO_LED_RED);
+ ao_timer_init();
+ ao_cmd_init();
+ ao_usb_init();
+ ao_monitor_init(AO_LED_GREEN, TRUE);
+ ao_rssi_init(AO_LED_RED);
+ ao_radio_init();
+ ao_packet_master_init();
+ ao_btm_init();
+#if HAS_DBG
+ ao_dbg_init();
+#endif
+ ao_config_init();
+ ao_start_scheduler();
+}
#define P2SEL_PRI3P1_MASK (1 << 6)
#define P2SEL_PRI2P1_USART1 (0 << 5)
#define P2SEL_PRI2P1_TIMER3 (1 << 5)
+#define P2SEL_PRI2P1_MASK (1 << 5)
#define P2SEL_PRI1P1_TIMER1 (0 << 4)
#define P2SEL_PRI1P1_TIMER4 (1 << 4)
+#define P2SEL_PRI1P1_MASK (1 << 4)
#define P2SEL_PRI0P1_USART0 (0 << 3)
#define P2SEL_PRI0P1_TIMER1 (1 << 3)
+#define P2SEL_PRI0P1_MASK (1 << 3)
#define P2SEL_SELP2_4_GPIO (0 << 2)
#define P2SEL_SELP2_4_PERIPHERAL (1 << 2)
+#define P2SEL_SELP2_4_MASK (1 << 2)
#define P2SEL_SELP2_3_GPIO (0 << 1)
#define P2SEL_SELP2_3_PERIPHERAL (1 << 1)
+#define P2SEL_SELP2_3_MASK (1 << 1)
#define P2SEL_SELP2_0_GPIO (0 << 0)
#define P2SEL_SELP2_0_PERIPHERAL (1 << 0)
#define P2SEL_SELP2_0_MASK (1 << 0)
--- /dev/null
+telebt-*
+ao_product.h
--- /dev/null
+--directory=..
--- /dev/null
+PROG = telebt-v0.0-$(VERSION).ihx
+
+SRC = \
+ $(TBT_BASE_SRC)
+
+PRODUCT=TeleBT-v0.0
+PRODUCT_DEF=-DTELEBT_V_0_0
+IDPRODUCT=0x000e