#ifndef __EX_MCU_H__ #define __EX_MCU_H__ #include "system/includes.h" #include "asm/crc16.h" // #include "debug.h" #include "boot.h" //=======================================================================// // 扩展注意!! // //=======================================================================// #define TCFG_EX_MCU_UART_ENABLE 1 #define TCFG_EX_MC_USE_FLASH 1 //是否使用系统延时接口进行os调度和任务切换,1为用os调度 0为裸板工程 #define TCFG_EX_MCU_OS_ENABLE 1 //是否在使用完串口传输代码之后,继续保留此串口传输数据 #define TCFG_EX_MCU_UART_TO_USE 1 struct ex_mcu_platform_data { u32 io_port;/*!<收发一线串口对应的引脚*/ u32 hand_baudrate;/*!<和从机握手时候的波特率,一般固定*/ u32 tran_baudrate;/*!<发送代码文件时候的波特率,可改,但需要和uboot的波特率一致*/ #if TCFG_EX_MCU_OS_ENABLE OS_SEM *sem_tx_rx; /*!<控制os调度后接收数据的同步*/ u8 *ex_mcu_buf; /*!<串口中断接收数据buf*/ // u8 *ex_mcu_buf_2; [>!<串口中断接收数据buf<] u32(*rx_init)(u8 *buf, u32 len);/*!<串口中断接收数据准备初始化*/ u32(*rx_buf)(void); /*!<串口中断接收数据*/ u32(*rx_buf_client)(u8 *uart_dma_buf, u32 dma_buf_len, u32 timeout); /*!