-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.h
62 lines (51 loc) · 1.27 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef __MAIN_H
#define __MAIN_H
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include "stm32f4xx_hal.h"
// BSP includes component
#include "bsp.h"
// FatFs includes component
#include "ff_gen_drv.h"
#include "sd_diskio.h"
// USB related
#include "usbd_core.h"
#include "usbd_desc.h"
#include "usbd_msc.h"
#include "usbd_storage.h"
typedef struct _mot_ {
int32_t AccX;
int32_t AccY;
int32_t AccZ;
int32_t AngX;
int32_t AngY;
int32_t AngZ;
int32_t MagX;
int32_t MagY;
int32_t MagZ;
} InsSample;
#define INERTIAL_SAMPLE_TIME_MS 10
#define IQ_LEN 1300
extern volatile char AccStat;
extern volatile char Tunnel;
extern volatile char UsbStat;
extern volatile char fLog;
extern uint16_t rmc_sog, rmc_cog;
extern volatile uint32_t log_period;
extern TIM_HandleTypeDef t1;
#define RX_BUFFER_SIZE 2048
#define LINE_BUFFER_SIZE 1024
extern char txline[LINE_BUFFER_SIZE];
extern char rxline[LINE_BUFFER_SIZE];
void ADC_Handler();
void FTP_Handler();
void USB_Handler();
void dputc(char ch);
void DebugPrint (char *pMsg, uint16_t msgSize);
uint32_t GetAdcValue(uint32_t channel);
uint32_t GetPhrase(char *dst, char eor);
uint32_t GetBytes(char *dst, uint32_t size);
static void MainThread(void const *argument);
void InertialSampleTask(void);
#endif