brazos-trapezoidal
Library
TSP
SerialBuffer
SerialBuffer_prm.h
Go to the documentation of this file.
1
14
#ifndef CONVERSOR_AD_2_SPIBUFFER_SPIBUFFER_PRM_H_
15
#define CONVERSOR_AD_2_SPIBUFFER_SPIBUFFER_PRM_H_
16
17
#include "drv_uart.h"
18
#include "
CustomUart.h
"
19
#include "
main.h
"
20
21
//=====================================================================================================================
22
//-------------------------------------- PUBLIC (Extern Variables, Constants & Defines) -------------------------------
23
//=====================================================================================================================
24
25
/********************************************************************************
26
* Defines the start byte for the TSP message
27
*/
28
#define START_BYTE 0xAA
29
33
#define SERIAL_TX_BUFFER_SIZE 4
34
38
#define SERIAL_RX_BUFFER_SIZE 5
39
43
#define SERIAL_BUFFER_SLOT_SIZE 255
44
48
#define SCI_HEADER_SIZE 4
49
53
#define UART_POINTER main__pointerUart0()
54
58
//#define SCI_START() R_Config_SCI9_Start()
59
60
#define SCI_SEND(data,num) uart_send( UART_POINTER, data, num, false )
61
#define SCI_RECEIVE(data,num) uart_receive( UART_POINTER, data, num, false )
62
63
#define SCI_BYTESSENT() uart_getTxCount( UART_POINTER )
64
#define SCI_BYTESEXPECTEDTX() customUart_getTxExpected( UART_POINTER )
65
#define SCI_BYTESRECEIVED() uart_getRxCount( UART_POINTER )
66
//#define SCI_SET_RX_NUM_BYTES(num) uart_control(UART_POINTER, , num)
67
68
#define SCI_RESETERRORFLAGS()
//r_Config_SCI9__reseterrorflag()
69
#define SCI_DISABLEINTRX() uart_control( UART_POINTER, UART_CTL_RX_INT_EN, DISABLE )
70
#define SCI_DISABLERX() uart_control( UART_POINTER, UART_CTL_RX_EN, DISABLE )
71
//#define SCI_GETERRORFLAGS() r_Config_SCI9__geterrorflag()
72
//
73
//#define ERRO_MASK 0x38
74
78
#define SCI_TX_PIN_STATE()
//Gpio__ReadPin(GPIO_PORT_B_PIN_1)
79
80
81
//=====================================================================================================================
82
//-------------------------------------- PUBLIC (Function Prototypes) -------------------------------------------------
83
//=====================================================================================================================
84
85
#endif
// CONVERSOR_AD_2_SPIBUFFER_SPIBUFFER_PRM_H_
86
87
CustomUart.h
Header file for CustomUart.c.
main.h
Header file for main.h.c.
Generated by
1.9.3