int SERCOM::writeDataUART(uint8_t data) { //Flush UART buffer flushUART(); //Put data into DATA register sercom->USART.DATA.reg = (uint16_t)data; return 1; }
//--------------------------------------------------------------------------- // uint32_t checkSupply(){ // Monitor Power Supply uint32_t miliVolt; short unsigned int data0; singleADC(0,&data0); miliVolt = (V_BANDGAP * (uint32_t )(0x3FF & data0)) / 0x3FF; printf("Supply Voltage: %lu mV\n", 4*miliVolt); flushUART(); return miliVolt; }