AVS/GD32F103C8T6/App/main.h
2023-11-17 11:07:26 +08:00

116 lines
3.0 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __MAIN_H
#define __MAIN_H
#define nullptr NULL
#define __weak __WEAK
/* Flash容量 (单位KB) */
#define FMC_CAPACITY_SIZE_64K
//#define FMC_CAPACITY_SIZE_128K
//#define FMC_CAPACITY_SIZE_512K
#include "gd32f10x_libopt.h"
#include <stdarg.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "can.h"
#include "fmc.h"
#include "gpio.h"
#include "iap.h"
#include "iic.h"
#include "spi.h"
#include "system.h"
#include "task.h"
#include "timer.h"
#include "usart.h"
#include "wdgt.h"
#include "api.h"
#include "app.h"
#include "diaodu.h"
#include "setting.h"
#include "m62429.h"
#include "v58.h"
/* 上位机 通讯串口 */
#define HOST_USART_PERIPH USART1
/* RS485 通讯串口 */
#define RS485_USART_PERIPH USART0
/* RS485使能控制脚高发低收 */
#define RS485_CL_PERIPH GPIOB
#define RS485_CL_PIN GPIO_PIN_1
/* 音量 Level 4 控制引脚 */
#define VOLUME_4_PERIPH GPIOB
#define VOLUME_4_PIN GPIO_PIN_12
/* 音量 Level 3 控制引脚 */
#define VOLUME_3_PERIPH GPIOB
#define VOLUME_3_PIN GPIO_PIN_13
/* 音量 Level 2 控制引脚 */
#define VOLUME_2_PERIPH GPIOB
#define VOLUME_2_PIN GPIO_PIN_14
/* 音量 Level 1 控制引脚 */
#define VOLUME_1_PERIPH GPIOA
#define VOLUME_1_PIN GPIO_PIN_8
/* 频闪灯 控制引脚 */
#define LED_STROBE_PERIPH GPIOB
#define LED_STROBE_PIN GPIO_PIN_15
/* 前车门 检测引脚 */
#define DOOR_FRONT_PERIPH GPIOB
#define DOOR_FRONT_PIN GPIO_PIN_9
/* 后车门 检测引脚 */
#define DOOR_BACK_PERIPH GPIOB
#define DOOR_BACK_PIN GPIO_PIN_8
/* 左转弯 检测引脚 */
#define TURN_LEFT_PERIPH GPIOA
#define TURN_LEFT_PIN GPIO_PIN_0
/* 右转弯 检测引脚 */
#define TURN_RIGHT_PERIPH GPIOA
#define TURN_RIGHT_PIN GPIO_PIN_1
/* 倒车 检测引脚 */
#define REVERSING_PERIPH GPIOB
#define REVERSING_PIN GPIO_PIN_6
/* 功放控制脚,默认为低,高电平打开 */
#define AMP_CTRL_PERIPH GPIOB
#define AMP_CTRL_PIN GPIO_PIN_5
/* V58 DATA 控制脚 */
#define V58_DATA_PERIPH GPIOA
#define V58_DATA_PIN GPIO_PIN_4
/* AK517 STATUS 控制脚 */
#define V58_STATUS_PERIPH GPIOA
#define V58_STATUS_PIN GPIO_PIN_7
#define M62429_SCL_PERIPH GPIOB
#define M62429_SCL_PIN GPIO_PIN_10
#define M62429_SDA_PERIPH GPIOB
#define M62429_SDA_PIN GPIO_PIN_11
#define LED_CAN_PERIPH GPIOA
#define LED_CAN_PIN GPIO_PIN_5
#define LED_DIAODU_PERIPH GPIOB
#define LED_DIAODU_PIN GPIO_PIN_0
#define LED_RUN_PERIPH GPIOB
#define LED_RUN_PIN GPIO_PIN_7
#endif