Rev 29 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#ifndef _UART_H_
#define _UART_H_
#include <inttypes.h>
#define NICK 0
#define ROLL 1
#define BAUD_RATE 57600
extern uint16_t Debug_Timer;
void USART0_Init (void);
void USART0_EnableTXD(void);
void USART0_DisableTXD(void);
void USART0_TransmitTxData(void);
void USART0_ProcessRxData(void);
int16_t USART0_putchar(int8_t c);
void USART0_Print(int8_t *msg);
typedef struct
{
uint8_t Digital[2];
uint16_t Analog[32]; // Debugvalues
} DebugOut_t;
extern DebugOut_t DebugOut;
typedef struct
{
int16_t Attitude[2]; // nick and roll angle in 0.1 deg
uint8_t UserParam[2];
uint8_t CalState;
uint8_t Orientation;
} ExternData_t;
extern ExternData_t ExternData;
typedef struct
{
uint8_t Digital[2];
uint8_t RemoteButtons;
int8_t Nick;
int8_t Roll;
int8_t Yaw;
uint8_t Gas;
int8_t Height;
uint8_t Par1;
uint8_t Par2;
uint8_t Par3;
} ExternControl_t;
extern ExternControl_t ExternControl;
typedef struct
{
uint8_t Major;
uint8_t Minor;
uint8_t PCCompatible;
uint8_t Reserved[7];
} VersionInfo_t;
extern VersionInfo_t VersionInfo;
extern uint8_t PC_Connected;
extern uint8_t FC_Connected;
#endif //_UART_H_