Xiaohai Li
/
AirBoxProto
Demo
PeripheralLayer/AirAdaptorLib.h@0:3dac4f477e98, 2015-07-08 (annotated)
- Committer:
- nightseas
- Date:
- Wed Jul 08 17:50:18 2015 +0000
- Revision:
- 0:3dac4f477e98
- Child:
- 2:0ee90da44162
Basic Demo; Implement: Debug serial commander, Gas sensors, Temp&Rh sensor.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nightseas | 0:3dac4f477e98 | 1 | #ifndef _PE_BD_LIB_ |
nightseas | 0:3dac4f477e98 | 2 | #define _PE_BD_LIB_ |
nightseas | 0:3dac4f477e98 | 3 | |
nightseas | 0:3dac4f477e98 | 4 | //Max number of onboard LEDs |
nightseas | 0:3dac4f477e98 | 5 | extern const int LED_NUM_MAX; |
nightseas | 0:3dac4f477e98 | 6 | |
nightseas | 0:3dac4f477e98 | 7 | //I2C for SHT20 & BMP180 |
nightseas | 0:3dac4f477e98 | 8 | extern I2C i2c_sen; |
nightseas | 0:3dac4f477e98 | 9 | |
nightseas | 0:3dac4f477e98 | 10 | //USART2 to PC, USART1 to sensors & WiFi module |
nightseas | 0:3dac4f477e98 | 11 | extern Serial uart_pc; |
nightseas | 0:3dac4f477e98 | 12 | extern Serial uart_sen; |
nightseas | 0:3dac4f477e98 | 13 | |
nightseas | 0:3dac4f477e98 | 14 | //LEDs on mother board and daughter board |
nightseas | 0:3dac4f477e98 | 15 | extern DigitalOut led_mb, led_db1_n, led_db2_n; |
nightseas | 0:3dac4f477e98 | 16 | |
nightseas | 0:3dac4f477e98 | 17 | //GPIO for CD4052 serial mux control |
nightseas | 0:3dac4f477e98 | 18 | extern DigitalOut smux_a, smux_b, smux_oe_n; |
nightseas | 0:3dac4f477e98 | 19 | |
nightseas | 0:3dac4f477e98 | 20 | //Init functions |
nightseas | 0:3dac4f477e98 | 21 | extern int BoardLibInit(void); |
nightseas | 0:3dac4f477e98 | 22 | |
nightseas | 0:3dac4f477e98 | 23 | //Serial mux functions |
nightseas | 0:3dac4f477e98 | 24 | extern void SerialMuxSel(int ch); |
nightseas | 0:3dac4f477e98 | 25 | extern void SerialMuxEnable(void); |
nightseas | 0:3dac4f477e98 | 26 | extern void SerialMuxDisable(void); |
nightseas | 0:3dac4f477e98 | 27 | |
nightseas | 0:3dac4f477e98 | 28 | //On-board LED functions |
nightseas | 0:3dac4f477e98 | 29 | extern void LedOn(int ch); |
nightseas | 0:3dac4f477e98 | 30 | extern void LedOff(int ch); |
nightseas | 0:3dac4f477e98 | 31 | extern void LedToggle(int ch); |
nightseas | 0:3dac4f477e98 | 32 | extern void LedOffAll(void); |
nightseas | 0:3dac4f477e98 | 33 | extern void LedOnAll(void); |
nightseas | 0:3dac4f477e98 | 34 | |
nightseas | 0:3dac4f477e98 | 35 | #endif |