Subversion Repositories MK3Mag

Rev

Rev 47 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
32 holgerb 1
#ifndef _UART_H_
2
#define _UART_H_
1 ingob 3
 
32 holgerb 4
#include <inttypes.h>
1 ingob 5
 
3 ingob 6
#define NICK 0
7
#define ROLL 1
1 ingob 8
 
9
 
32 holgerb 10
#define BAUD_RATE 57600
1 ingob 11
 
32 holgerb 12
 
41 killagreg 13
extern uint16_t DebugData_Timer;
32 holgerb 14
 
15
 
16
void USART0_Init (void);
17
void USART0_EnableTXD(void);
18
void USART0_DisableTXD(void);
19
void USART0_TransmitTxData(void);
20
void USART0_ProcessRxData(void);
21
int16_t USART0_putchar(int8_t c);
22
void USART0_Print(int8_t *msg);
23
 
24
 
25
 
26
typedef struct
1 ingob 27
{
32 holgerb 28
        uint8_t Digital[2];
29
        uint16_t Analog[32];    // Debugvalues
30
}  DebugOut_t;
1 ingob 31
 
32 holgerb 32
extern DebugOut_t DebugOut;
1 ingob 33
 
34
 
35
 
32 holgerb 36
typedef struct
37
{
38
        int16_t Attitude[2];  // nick and roll angle in 0.1 deg
39
        uint8_t UserParam[2];
40
        uint8_t CalState;
41
        uint8_t Orientation;
42
}  ExternData_t;
1 ingob 43
 
32 holgerb 44
extern ExternData_t  ExternData;
1 ingob 45
 
32 holgerb 46
typedef struct
47
{
48
        uint8_t Digital[2];
49
        uint8_t RemoteButtons;
50
        int8_t  Nick;
51
        int8_t  Roll;
52
        int8_t  Yaw;
53
        uint8_t Gas;
54
        int8_t  Height;
41 killagreg 55
        uint8_t free;
56
        uint8_t Frame;
57
        uint8_t Config;
32 holgerb 58
}  ExternControl_t;
1 ingob 59
 
32 holgerb 60
extern ExternControl_t  ExternControl;
1 ingob 61
 
62
 
32 holgerb 63
typedef struct
64
{
47 killagreg 65
        uint8_t SWMajor;
66
        uint8_t SWMinor;
67
        uint8_t ProtoMajor;
68
        uint8_t ProtoMinor;
69
        uint8_t SWPatch;
70
        uint8_t Reserved[5];
41 killagreg 71
}  UART_VersionInfo_t;
1 ingob 72
 
32 holgerb 73
extern uint8_t PC_Connected;
74
extern uint8_t FC_Connected;
75
 
76
#endif //_UART_H_