Demonstrate ALS support in the CC26xx demo

This commit is contained in:
George Oikonomou 2016-05-28 19:40:52 +01:00
parent 2ec9c8ccf0
commit 5a39df1439
1 changed files with 9 additions and 0 deletions

View File

@ -337,6 +337,15 @@ get_sync_sensor_readings(void)
value = batmon_sensor.value(BATMON_SENSOR_TYPE_VOLT);
printf("Bat: Volt=%d mV\n", (value * 125) >> 5);
#if BOARD_SMARTRF06EB
SENSORS_ACTIVATE(als_sensor);
value = als_sensor.value(0);
printf("ALS: %d raw\n", value);
SENSORS_DEACTIVATE(als_sensor);
#endif
return;
}
/*---------------------------------------------------------------------------*/