22 P1SEL2 |= BIT1 + BIT2;
40 while (!(IFG2 & UCA0TXIFG));
68 uint8_t isNegative = 0;
79 buffer[i++] = (num % 10) +
'0';
92 for (j = i - 1; j >= 0; j--)
112 buffer[i++] = (num % 10) +
'0';
120 for (j = i - 1; j >= 0; j--)
134 int hours = (seconds / 3600) % 24;
135 int minutes = (seconds % 3600) / 60;
158 for (i = 0; i < length; i++)
160 char c = arr[i] ?
'1' :
'0';
void UART_SendChar(char c)
send a single character via UART to host system
void UART_SendInt(int32_t num)
send a 16 bit integer to host system
void UART_Bitstream(const bool *arr, unsigned int length)
Sends a the received DCF bitstream to host system.
void UART_SendTime(uint32_t seconds)
Sends a time formated in hours and minutes to host system.
void UART_Init(void)
Setup UART communication, gets called from main()
void UART_SendUint32(uint32_t num)
send a 32 bit integer to host system
void UART_SendString(char *str)
send a full string to host system