X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=boards%2Fsam3x-ek%2Fexamples%2Fsam3x-ek_display%2Fmain.c;h=83f568ef288948d81571e435086fa65794a6e93d;hb=f1700213ce77cc08371c77ba3da1f6e8cf60e4f3;hp=c712289306a94a4ac7c5b2eee8ad386c782f5427;hpb=34775fdcd158566a5abd395b22ba7ac4852e8958;p=bertos.git diff --git a/boards/sam3x-ek/examples/sam3x-ek_display/main.c b/boards/sam3x-ek/examples/sam3x-ek_display/main.c index c7122893..83f568ef 100644 --- a/boards/sam3x-ek/examples/sam3x-ek_display/main.c +++ b/boards/sam3x-ek/examples/sam3x-ek_display/main.c @@ -322,10 +322,10 @@ static void read_adc(Bitmap *bm) while (1) { uint16_t value = ADC_RANGECONV(adc_read(1), 0, 3300); - uint16_t temp = hw_convertToDegree (adc_read(ADC_TEMPERATURE_CH)); + uint16_t temp = hw_convertToDegree(adc_read(ADC_TEMPERATURE_CH)); text_xprintf(lcd_bitmap, 2, 0, TEXT_FILL | TEXT_CENTER, - "Volage on VR1: %d.%dV", value / 1000, value % 1000); + "Voltage on VR1: %d.%dV", value / 1000, value % 1000); text_xprintf(lcd_bitmap, 3, 0, TEXT_FILL | TEXT_CENTER, "CPU temperature: %d.%dC", temp / 10, temp % 10); lcd_hx8347_blitBitmap(bm); @@ -345,8 +345,8 @@ static struct MenuItem main_items[] = { (const_iptr_t)"Scheduling test", 0, (MenuHook)context_switch_test, NULL }, { (const_iptr_t)"Show uptime", 0, (MenuHook)uptime, NULL }, { (const_iptr_t)"Display brightness", 0, (MenuHook)setBrightness, NULL }, + { (const_iptr_t)"ADC demo", 0, (MenuHook)read_adc, NULL }, { (const_iptr_t)"Reboot", 0, (MenuHook)soft_reset, NULL }, - { (const_iptr_t)"Read ADC value", 0, (MenuHook)read_adc, NULL }, { (const_iptr_t)0, 0, NULL, (iptr_t)0 } }; static struct Menu main_menu = { main_items, "BeRTOS", MF_STICKY | MF_SAVESEL, NULL, 0, lcd_hx8347_blitBitmap };