Subversion Repositories MK3Mag

Rev

Rev 18 | Rev 21 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19 killagreg 1
#ifndef _UART_H_
2
#define _UART_H_
1 ingob 3
 
19 killagreg 4
#include <inttypes.h>
1 ingob 5
 
3 ingob 6
#define NICK 0
7
#define ROLL 1
1 ingob 8
 
9
 
19 killagreg 10
#define BAUD_RATE 57600
1 ingob 11
 
19 killagreg 12
 
13
extern uint16_t Debug_Timer;
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 uart_putchar(int8_t c);
22
 
23
 
24
 
25
typedef struct
1 ingob 26
{
19 killagreg 27
        uint8_t Digital[2];
28
        uint16_t Analog[32];    // Debugvalues
29
} DebugOut_t;
1 ingob 30
 
19 killagreg 31
extern DebugOut_t DebugOut;
1 ingob 32
 
33
 
34
 
19 killagreg 35
typedef struct
36
{
37
        int16_t Attitude[2];  // nock and roll angle in 0.1 deg
38
        uint8_t UserParam[2];
39
        uint8_t CalState;
40
        uint8_t Orientation;
41
} ExternData_t;
1 ingob 42
 
19 killagreg 43
extern ExternData_t  ExternData;
1 ingob 44
 
45
 
19 killagreg 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;
55
        uint8_t Par1;
56
        uint8_t Par2;
57
        uint8_t Par3;
58
} ExternControl_t;
1 ingob 59
 
19 killagreg 60
extern ExternControl_t  ExternControl;
1 ingob 61
 
62
 
19 killagreg 63
typedef struct
64
{
65
        uint8_t Major;
66
        uint8_t Minor;
67
        uint8_t PCCompatible;
68
        uint8_t Reserved[7];
69
}  VersionInfo_t;
1 ingob 70
 
19 killagreg 71
extern VersionInfo_t VersionInfo;
72
 
73
 
74
#endif //_UART_H_