12.07.2015 Views

SUB-20 User Manual - Dimax

SUB-20 User Manual - Dimax

SUB-20 User Manual - Dimax

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

47<strong>SUB</strong>-<strong>20</strong><strong>SUB</strong>-<strong>20</strong> APIsub_adc_single( fd, &adc, ADC_S0 ); /* Read ADC on ADC0 input */adc_mux[0] = ADC_S0;adc_mux[1] = ADC_S2;adc_mux[2] = ADC_S3;sub_adc_read( fd, adc_buf, adc_mux, 3 ); /* Read ADC on ADC0,2,3 inputs */3.9 LCD FunctionsFunctions· sub_lcd_write3.9.1 sub_lcd_writeSynopsisint sub_lcd_write( sub_handle hndl, char* str );This function will work only on <strong>SUB</strong>-<strong>20</strong> configurations with LCD.Characters from *str are written to the LCD beginning from the current LCD position. Special characters andsequences listed below are used to format LCD output and control current position.ANSI C notation Hex value Description Example\f 0x0C Clear LCD and go to first position "\fHello"\r 0x0D Go to first position "\r0123"\n 0x0A Go to next string "\rHello\nWorld"\eXY 0x1B X Y Go to position X,Y "\e00Hello\e01World"Every string written to LCD will be space padded till the end of the string.Parameters· *str - LCD stringReturn valueOn success function returns 0. If LCD is not supported function will return "Feature not supported".Examplesub_lcd_write( hndl,"\fHello\nWorld" );sub_lcd_write( hndl,"\f\e<strong>20</strong>Hello\e21World" );sub_lcd_write( hndl, "\r1\n2" ); 12sub_lcd_write( hndl, "\fT:\nR:");sub_lcd_write( hndl,"\e<strong>20</strong>abc\e21def" );HelloWorldHelloWorldT:abcR:defCompatibility· Required firmware version > 0.0.4© <strong>20</strong>13 xdimax.com rev 2.17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!