21 #include "msp430f2274.h"
147 frameHeader[0] = len;
148 frameHeader[1] = cmd0;
149 frameHeader[2] = cmd1;
192 for (i = len; i != 0; i--) {
273 if (IFG2 & UCA0TXIFG) {
546 ((
char *) &(time.secondsField.secondsLow))[0] =
uart_rxBuf[i];
550 ((
char *) &(time.secondsField.secondsLow))[1] =
uart_rxBuf[i];
554 ((
char *) &(time.secondsField.secondsLow))[2] =
uart_rxBuf[i];
558 ((
char *) &(time.secondsField.secondsLow))[3] =
uart_rxBuf[i];
562 ((
char *) &(time.secondsField.secondsHigh))[0] =
uart_rxBuf[i];
566 ((
char *) &(time.secondsField.secondsHigh))[1] =
uart_rxBuf[i];
570 ((
char *) &(time.nanoSecondsField))[0] =
uart_rxBuf[i];
574 ((
char *) &(time.nanoSecondsField))[1] =
uart_rxBuf[i];
578 ((
char *) &(time.nanoSecondsField))[2] =
uart_rxBuf[i];
582 ((
char *) &(time.nanoSecondsField))[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...
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.
void ptp_adjNetTime(ptp_integer64 *timeAdjust)
Adjust net time.
void ptp_setNetTime(PTP_TimeStamp *time, ptp_uinteger8 clockClass, ptp_clockAccuracy clockAccuracy, ptp_timeSource timeSource)
Set net time.
#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 ptp_setTickTime(ptp_uinteger32 *newTickSize)
Set tick time.
void uart_sndnextchar()
Send next char.
PTP data types specifications.
UInt8 uart_sndUInt48(uint64_t *p)
Send UInt48.
void spi_init()
SPI initialization.
char uart_txBuf[UART_TX_BUF_SIZE]
UART TX buffer.
UInt8 uart_sndUInt64(uint64_t *p)
Send UInt64.