altos: Split out arch-specific bits of LCD driver
[fw/altos] / src / core / ao.h
index 1d5769cb0f6b5c62f77588e9341aec59c6ea4e76..c800f1fc56e16da4b6e0059da948d296ecdb2479 100644 (file)
@@ -975,10 +975,10 @@ ao_spi_init(void);
  */
 
 uint8_t
-ao_spi_read(uint8_t *buf, uint8_t len);
+ao_spi_slave_recv(uint8_t *buf, uint8_t len);
 
 void
-ao_spi_write(uint8_t *buf, uint8_t len);
+ao_spi_slave_send(uint8_t *buf, uint8_t len);
 
 void
 ao_spi_slave_init(void);
@@ -1341,8 +1341,18 @@ ao_radio_recv(__xdata void *data, uint8_t size) __reentrant;
 void
 ao_radio_recv_abort(void);
 
+/*
+ * Compute the packet length as follows:
+ *
+ * 2000 bps (for a 1kHz tone)
+ * so, for 'ms' milliseconds, we need
+ * 2 * ms bits, or ms / 4 bytes
+ */
+
+#define AO_MS_TO_RDF_LEN(ms) ((ms) > 255 * 4 ? 255 : ((ms) >> 2))
+
 void
-ao_radio_rdf(int ms);
+ao_radio_rdf(uint8_t pkt_len);
 
 void
 ao_radio_rdf_abort(void);
@@ -1657,9 +1667,37 @@ ao_companion_init(void);
 
 /* ao_lcd.c */
   
+void
+ao_lcd_putchar(uint8_t data);
+
+void
+ao_lcd_putstring(char *string);
+
+void
+ao_lcd_contrast_set(uint8_t contrast);
+
+void
+ao_lcd_clear(void);
+
+#define AO_LCD_ADDR(row,col)   ((row << 6) | (col))
+
+void
+ao_lcd_goto(uint8_t addr);
+
+void
+ao_lcd_start(void);
+
 void
 ao_lcd_init(void);
 
+/* ao_lcd_port.c */
+
+void
+ao_lcd_port_put_nibble(uint8_t rs, uint8_t data);
+
+void
+ao_lcd_port_init(void);
+
 /* ao_aes.c */
 
 __xdata uint8_t ao_aes_mutex;
@@ -1801,4 +1839,16 @@ ao_log_single_init(void);
 void
 ao_log_single(void);
 
+/*
+ * ao_pyro_slave.c
+ */
+
+#define AO_TELEPYRO_NUM_ADC    9
+
+#ifndef ao_xmemcpy
+#define ao_xmemcpy(d,s,c) memcpy(d,s,c)
+#define ao_xmemset(d,v,c) memset(d,v,c)
+#define ao_xmemcmp(d,s,c) memcmp(d,s,c)
+#endif
+
 #endif /* _AO_H_ */