1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/phynode-kw41z:enable ccs811,mma8x5x,tcs37727 sensors

This commit is contained in:
PeterKietzmann 2019-01-23 15:03:23 +01:00
parent 7e77ac7ace
commit 536cf1b4e9
4 changed files with 53 additions and 5 deletions

View File

@ -1,6 +1,9 @@
ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
USEMODULE += saul_adc
USEMODULE += ccs811
USEMODULE += mma8x5x
USEMODULE += tcs37727
endif
include $(RIOTCPU)/kinetis/Makefile.dep

View File

@ -45,4 +45,11 @@ void board_init(void)
gpio_init(LED3_PIN, GPIO_OUT);
gpio_set(LED3_PIN);
#endif
/* If further modules are supported (e.g. HDC1010 sensor or the EPD) they have
* to be added here so V_PERIPH pin is set and the devices are powered */
#if defined(MODULE_MMA8X5X) || defined(MODULE_TCS37727) || \
defined(MODULE_CCS811)
gpio_init(V_PERIPH_PIN, GPIO_OUT);
gpio_set(V_PERIPH_PIN);
#endif
}

View File

@ -13,7 +13,8 @@ It provides a radio device with Bluetooth Low Energy and/or IEEE
802.15.4.
There's also available an HDL1010 High Accuracy Digital Humidity sensor, a
CCS811 IAQ gas sensor and a TCS37727 RGB Light sensor.
CCS811 IAQ gas sensor, a MMA8652FC accelerometer and a TCS37727 RGB Light
sensor.
There board also provides an SSD1673 Active Matrix EPD 150x200 Display Driver
with Controller on board.
@ -35,11 +36,10 @@ To flash the board using OpenOCD:
### Current support
Only the TCS37727 RGB Light sensor is supported. There's ongoing work
on [IEEE802.15.4 radio support for KW41Z][radio-support] and
[CCS811 gas sensor][gas-sensor]
The TCS37727 RGB Light sensor, the MMA8652FC accelerometer and the CCS811
digital gas sensor are supported. There's ongoing work on
[IEEE802.15.4 radio support for KW41Z][radio-support]
[radio-support]: https://github.com/RIOT-OS/RIOT/pull/7107
[gas-sensor]: https://github.com/RIOT-OS/RIOT/pull/10033
*/

View File

@ -73,6 +73,16 @@ extern "C"
#define BTN0_MODE GPIO_IN_PU
/** @} */
/**
* @name Sensors voltage pin definitions (V_PERIPH)
* @{
*/
#define V_PERIPH_PIN GPIO_PIN(PORT_C, 19)
#define V_PERIPH_MASK (1 << 19)
#define V_PERIPH_ON (GPIOC->PSOR = V_PERIPH_MASK)
#define V_PERIPH_OFF (GPIOC->PCOR = V_PERIPH_MASK)
/** @} */
/**
* @name xtimer configuration
* @{
@ -95,6 +105,34 @@ extern "C"
#endif
/** @} */
/**
* @name Define the interface for the CCS811 gas sensors
* @{
*/
#define CCS811_PARAM_I2C_DEV (I2C_DEV(0))
#define CCS811_PARAM_I2C_ADDR (0x5A)
#define CCS811_PARAM_RESET_PIN (GPIO_UNDEF)
#define CCS811_PARAM_WAKE_PIN (GPIO_PIN(1, 2))
#define CCS811_PARAM_INT_PIN (GPIO_PIN(1, 3))
#define CCS811_PARAM_INT_MODE (CCS811_INT_NONE)
/** @} */
/**
* @name Define the interface for the TCS37727 RGB light sensor
* @{
*/
#define TCS37727_PARAM_I2C (I2C_DEV(0))
#define TCS37727_PARAM_ADDR (0x29)
/** @} */
/**
* @name Define the interface for the MMA8X5X accelerometer
* @{
*/
#define MMA8X5X_PARAM_I2C (I2C_DEV(0))
#define MMA8X5X_PARAM_ADDR (0x1D)
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and standard I/O
*/