Lizzy project
Dependencies: aconno_I2C Lis2dh12 adc52832_common aconno_SEGGER_RTT
bsp/bsp.h@19:2681edc2f2b9, 2018-09-13 (annotated)
- Committer:
- jurica238814
- Date:
- Thu Sep 13 12:20:35 2018 +0200
- Branch:
- mbedOsUpdate
- Revision:
- 19:2681edc2f2b9
- Parent:
- 8:7ba4f82de9b6
- Child:
- 22:7dae8496b97c
Work in progress
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dbartolovic | 8:7ba4f82de9b6 | 1 | #ifndef __BSP_H__ |
dbartolovic | 8:7ba4f82de9b6 | 2 | #define __BSP_H__ |
dbartolovic | 8:7ba4f82de9b6 | 3 | |
jurica238814 | 19:2681edc2f2b9 | 4 | #include "aconnoConfig.h" |
jurica238814 | 19:2681edc2f2b9 | 5 | #include "mbed.h" |
jurica238814 | 19:2681edc2f2b9 | 6 | |
jurica238814 | 19:2681edc2f2b9 | 7 | #define I2C_ADDRESS (0b00110010) |
dbartolovic | 8:7ba4f82de9b6 | 8 | |
dbartolovic | 8:7ba4f82de9b6 | 9 | #if NANO_MODULE |
dbartolovic | 8:7ba4f82de9b6 | 10 | #define I2C_DATA (p2) |
dbartolovic | 8:7ba4f82de9b6 | 11 | #define I2C_CLK (p3) |
dbartolovic | 8:7ba4f82de9b6 | 12 | #define INT_PIN1 (p10) |
dbartolovic | 8:7ba4f82de9b6 | 13 | #define INT_PIN2 (p9) |
dbartolovic | 8:7ba4f82de9b6 | 14 | #define ACC_POWER_PIN (p13) |
dbartolovic | 8:7ba4f82de9b6 | 15 | #define RED_LED_PIN (p12) |
dbartolovic | 8:7ba4f82de9b6 | 16 | #else |
dbartolovic | 8:7ba4f82de9b6 | 17 | #define I2C_DATA (p20) |
dbartolovic | 8:7ba4f82de9b6 | 18 | #define I2C_CLK (p17) |
dbartolovic | 8:7ba4f82de9b6 | 19 | #define INT_PIN1 (p16) |
dbartolovic | 8:7ba4f82de9b6 | 20 | #define INT_PIN2 (p15) |
dbartolovic | 8:7ba4f82de9b6 | 21 | #define ACC_POWER_PIN (p11) |
dbartolovic | 8:7ba4f82de9b6 | 22 | #define RED_LED_PIN (p31) //p22 |
dbartolovic | 8:7ba4f82de9b6 | 23 | #define GREEN_LED_PIN (p2) |
dbartolovic | 8:7ba4f82de9b6 | 24 | #define BLUE_LED_PIN (p3) |
dbartolovic | 8:7ba4f82de9b6 | 25 | #define BUZZER_PIN (p18) |
dbartolovic | 8:7ba4f82de9b6 | 26 | #endif |
dbartolovic | 8:7ba4f82de9b6 | 27 | |
jurica238814 | 19:2681edc2f2b9 | 28 | enum lisPower_t{ |
jurica238814 | 19:2681edc2f2b9 | 29 | LIS_ON = 0, |
jurica238814 | 19:2681edc2f2b9 | 30 | LIS_OFF |
jurica238814 | 19:2681edc2f2b9 | 31 | }; |
jurica238814 | 19:2681edc2f2b9 | 32 | |
jurica238814 | 19:2681edc2f2b9 | 33 | extern lisPower_t lisPower; |
jurica238814 | 19:2681edc2f2b9 | 34 | |
jurica238814 | 19:2681edc2f2b9 | 35 | extern DigitalOut lisPowerPin; |
jurica238814 | 19:2681edc2f2b9 | 36 | extern char memsI2CAddress; |
jurica238814 | 19:2681edc2f2b9 | 37 | extern InterruptIn lisInt1Pin; |
jurica238814 | 19:2681edc2f2b9 | 38 | //extern InterruptIn INT2(); |
jurica238814 | 19:2681edc2f2b9 | 39 | extern I2C i2c; |
jurica238814 | 19:2681edc2f2b9 | 40 | |
jurica238814 | 19:2681edc2f2b9 | 41 | void lisPowerCtrl(lisPower_t power); |
jurica238814 | 19:2681edc2f2b9 | 42 | |
jurica238814 | 19:2681edc2f2b9 | 43 | #endif //__BSP_H__ |