![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The isl29023_poll.c file implements the ISSDK ISL29023 sensor driver example demonstration in poll mode. More...
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
#include "fsl_debug_console.h"
#include "fsl_irqsteer.h"
#include "Driver_I2C.h"
#include "issdk_hal.h"
#include "isl29023_drv.h"
Go to the source code of this file.
Macros | |
#define | ISL29023_DATA_SIZE (2) /* 2 bytes of information */ |
The size of the ISL29023 sensor data. More... | |
#define | ISL29023_INT_HT_DATA (11000) /* HI-IRQ treshold value (relative to 16-bit res.)*/ |
#define | ISL29023_INT_LT_DATA (5000) /* LO-IRQ treshold value (relative to 16-bit res.)*/ |
Functions | |
int | main (void) |
Main function. More... | |
Variables | |
const registerwritelist_t | ISL29023_Config_Poll [] |
const registerreadlist_t | ISL29023_Status [] = {{.readFrom = ISL29023_CMD_I, .numBytes = 1}, __END_READ_DATA__} |
const registerreadlist_t | ISL29023_Output_Values [] |
The isl29023_poll.c file implements the ISSDK ISL29023 sensor driver example demonstration in poll mode.
Definition in file isl29023_poll.c.
#define ISL29023_DATA_SIZE (2) /* 2 bytes of information */ |
The size of the ISL29023 sensor data.
Definition at line 34 of file isl29023_poll.c.
Referenced by main().
#define ISL29023_INT_HT_DATA (11000) /* HI-IRQ treshold value (relative to 16-bit res.)*/ |
Definition at line 43 of file isl29023_poll.c.
#define ISL29023_INT_LT_DATA (5000) /* LO-IRQ treshold value (relative to 16-bit res.)*/ |
Definition at line 44 of file isl29023_poll.c.
int main | ( | void | ) |
Main function.
Initialize the MCU hardware.
Initialize the I2C driver.
Set the I2C Power mode.
Set the I2C bus speed.
Initialize the ISL29023 sensor driver.
Configure the ISL29023 sensor driver.
Wait for clear IRQ flag bit.
Read the raw sensor data from the ISL29023.
Convert the raw sensor data to signed 16-bit container for display to the debug port.
Definition at line 78 of file isl29023_poll.c.
References ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), data, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), ISL29023_CMD_I_FLAG_MASK, ISL29023_DATA_SIZE, ISL29023_I2C_ADDRESS, ISL29023_I2C_Configure(), ISL29023_I2C_Initialize(), ISL29023_I2C_ReadData(), ISL29023_I2C_TEST_VALUE, isl29023_lightdata_t::light, rawData, SENSOR_ERROR_NONE, and status.
const registerwritelist_t ISL29023_Config_Poll[] |
Prepare the register write list to configure ISL29023 in 16-bits ALS continuous mode.
Definition at line 50 of file isl29023_poll.c.
const registerreadlist_t ISL29023_Output_Values[] |
Prepare the register read list to read the raw ADC data from the ISL29023.
Definition at line 69 of file isl29023_poll.c.
const registerreadlist_t ISL29023_Status[] = {{.readFrom = ISL29023_CMD_I, .numBytes = 1}, __END_READ_DATA__} |
Prepare the register read list to read ISL29023 IRQ flag bit.
Definition at line 66 of file isl29023_poll.c.