Subversion Repositories FlightCtrl

Rev

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

Rev Author Line No. Line
1612 dongfang 1
#ifndef _UART0_H
2
#define _UART0_H
3
 
2189 - 4
#define TXD_BUFFER_LEN  140
5
#define RXD_BUFFER_LEN  140
1612 dongfang 6
 
7
#include <inttypes.h>
2189 - 8
#include <stdio.h>
2055 - 9
#include "ubx.h"
1612 dongfang 10
 
11
//Baud rate of the USART
12
#define USART0_BAUD 57600
13
 
2018 - 14
extern void usart0_init(void);
15
extern void usart0_transmitTxData(void);
16
extern void usart0_processRxData(void);
2189 - 17
//extern int16_t uart_putchar(int8_t c);
1612 dongfang 18
 
2189 - 19
extern int uart_putchar(char c, FILE* fims);
20
 
2018 - 21
// extern uint8_t remotePollDisplayLine;
1612 dongfang 22
 
2189 - 23
extern uint8_t outputTestActive;
24
extern uint8_t outputTest[16];
1612 dongfang 25
 
26
typedef struct {
2189 - 27
  float pitchRate;  // in radians
28
  float rollRate;   // in radians
29
  float yawRate;    // in radians
1612 dongfang 30
 
2189 - 31
  float pitch; // in radians
32
  float roll;  // in radians
33
  float heading;    // in radians
34
 
35
  float xAcc;
36
  float yAcc;
37
  float zAcc;
38
}__attribute__((packed)) IMUData;
39
 
2055 - 40
typedef struct {
2189 - 41
  IMUData imuData;
2055 - 42
  GPS_INFO_t GPSInfo;
43
  int32_t airpressureHeight;
44
  int16_t batteryVoltage;
45
}__attribute__((packed)) OSDData_t;
46
 
1612 dongfang 47
#endif //_UART0_H