21 #include "msp430f2274.h"
146 frameHeader[0] = len;
147 frameHeader[1] = cmd0;
148 frameHeader[2] = cmd1;
191 for (i = len; i != 0; i--) {
272 if (IFG2 & UCA0TXIFG) {
545 ((
char *) &(time.seconds.secondsLow))[0] =
uart_rxBuf[i];
549 ((
char *) &(time.seconds.secondsLow))[1] =
uart_rxBuf[i];
553 ((
char *) &(time.seconds.secondsLow))[2] =
uart_rxBuf[i];
557 ((
char *) &(time.seconds.secondsLow))[3] =
uart_rxBuf[i];
561 ((
char *) &(time.seconds.secondsHigh))[0] =
uart_rxBuf[i];
565 ((
char *) &(time.seconds.secondsHigh))[1] =
uart_rxBuf[i];
569 ((
char *) &(time.nanoSeconds))[0] =
uart_rxBuf[i];
573 ((
char *) &(time.nanoSeconds))[1] =
uart_rxBuf[i];
577 ((
char *) &(time.nanoSeconds))[2] =
uart_rxBuf[i];
581 ((
char *) &(time.nanoSeconds))[3] =
uart_rxBuf[i];
Network functions interface.
#define UART_TX_BUF_SIZE
UART TX buffer size.
void USCIA0TX_ISR()
USCIA0 TX ISR.
UInt8 uart_sndUInt8(UInt8 v)
Send UInt8.
Interruption management (enable/disable) interface.
UInt8 uart_txBufFree()
TX buffer free.
void nwk_setSink(UInt8 sink)
Set sink.
UInt16 uart_proccess()
UART process.
UInt8 uart_rxBufWrite
RX buffer write pointer, if + 1 = uart_rxBufRead, full buffer, must roll to zero at at UART_RX_BUF_SI...
UInt32 clock_tickSize
Tick size (ns)
void im_disable_interrupt()
Disable interrupt.
void ccai_resetFull()
Full reset.
UInt8 uart_startFrame(UInt8 len, UInt8 cmd0, UInt8 cmd1)
Start frame.
void im_enable_interrupt()
Enable interrupt.
UInt8 uart_txBufRead
TX buffer read pointer, if = uart_txBufWrite, no chars to send, must roll to zero at at UART_TX_BUF_S...
UInt8 uart_sndUInt16(UInt16 v)
Send UInt16.
void nwk_setDeviceType(nwk_devType newType)
Set device type.
void USCIA0RX_ISR()
USCIA0 RX ISR.
UInt8 uart_sndUInt32(UInt32 *p)
Send UInt32.
void nwk_init()
Network initialization.
UInt8 uart_rxBufRead
RX buffer read pointer, if = uart_rxBufWrite, no chars to send, must roll to zero at at UART_RX_BUF_S...
UInt8 uart_forwardCmd(char *pBuf)
Forward command.
char uart_currentFCS
Frame-check sequence.
UInt8 uart_sndInt64(int64_t *p)
Send Int64.
UInt8 uart_snd(UInt8 len, void *pBuf)
Send.
char uart_rxBuf[UART_RX_BUF_SIZE]
UART RX buffer.
UInt8 uart_txBufWrite
TX buffer write pointer, if + 1 = uart_txBufRead, full buffer, must roll to zero at at UART_TX_BUF_SI...
UInt8 uart_txBufFreeReal()
TX buffer real free.
#define UART_RX_BUF_SIZE
UART RX buffer size.
void uart_proccessCmd()
Process command.
void uart_init()
UART initialization.
void uart_endFrame()
End frame.
void uart_sndnextchar()
Send next char.
UInt8 uart_sndUInt48(uint64_t *p)
Send UInt48.
void spi_init()
SPI initialization.
char uart_txBuf[UART_TX_BUF_SIZE]
UART TX buffer.
void clock_setTime(clock_timeStamp *sourceTime)
Set time.
void clock_adjTime(int64_t *adjValue)
Adjust time.
UInt8 uart_sndUInt64(uint64_t *p)
Send UInt64.