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

View file

@ -337,6 +337,15 @@ get_sync_sensor_readings(void)
value = batmon_sensor.value(BATMON_SENSOR_TYPE_VOLT); value = batmon_sensor.value(BATMON_SENSOR_TYPE_VOLT);
printf("Bat: Volt=%d mV\n", (value * 125) >> 5); 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; return;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/