Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: rgb_sensor_buffer discrete_rgb_color_sensor_example
Diff: rgb_sensor.cpp
- Revision:
- 10:b95dfd2d6d4d
- Parent:
- 9:7bd80f4a965e
diff -r 7bd80f4a965e -r b95dfd2d6d4d rgb_sensor.cpp
--- a/rgb_sensor.cpp Thu Jul 03 17:24:41 2014 +0000
+++ b/rgb_sensor.cpp Wed Jul 09 10:27:38 2014 +0000
@@ -140,7 +140,7 @@
if(status & (1UL<<m_adc_channel))
{
/* always read sample to acknowledge IRQ */
- sample = (((&LPC_ADC->ADDR0)[m_adc_channel])>>4) & 0xFFF;
+ sample = (((&LPC_ADC->ADDR0)[m_adc_channel])>>4) & RGB_MASK;
if(!m_done)
{