예제 #1
0
int SERCOM::writeDataUART(uint8_t data)
{
    //Flush UART buffer
    flushUART();

    //Put data into DATA register
    sercom->USART.DATA.reg = (uint16_t)data;
    return 1;
}
예제 #2
0
파일: main.c 프로젝트: 20Mhz/avr_examples
//---------------------------------------------------------------------------
//
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;
}