optimize ch438 function on aiit-riscv64-board and xidatong-riscv64

This commit is contained in:
Liu_Weichao
2022-09-05 18:03:09 +08:00
parent e4f2c3e5aa
commit 1fd4e3981d
7 changed files with 256 additions and 882 deletions
@@ -253,6 +253,8 @@
#define Fpclk 1843200 /* Define the internal clock frequency */
#define CH438_RECV_TIMEOUT 1000000 * 1000
void Set485Input(uint8 ch_no);
void Set485Output(uint8 ch_no);
@@ -50,6 +50,34 @@ enum HS_GPIO_CONFIG
GPIO_ALLOC_START /* index of gpio driver start */
};
#ifdef BSP_USING_CH438
#define FPIOA_CH438_ALE 12
#define FPIOA_CH438_NWR 13
#define FPIOA_CH438_NRD 14
#define FPIOA_CH438_D0 15
#define FPIOA_CH438_D1 16
#define FPIOA_CH438_D2 17
#define FPIOA_CH438_D3 18
#define FPIOA_CH438_D4 19
#define FPIOA_CH438_D5 20
#define FPIOA_CH438_D6 21
#define FPIOA_CH438_D7 22
#define FPIOA_CH438_INT 23
#define BSP_CH438_ALE_PIN 24
#define BSP_CH438_NWR_PIN 25
#define BSP_CH438_NRD_PIN 26
#define BSP_CH438_D0_PIN 27
#define BSP_CH438_D1_PIN 28
#define BSP_CH438_D2_PIN 29
#define BSP_CH438_D3_PIN 30
#define BSP_CH438_D4_PIN 31
#define BSP_CH438_D5_PIN 32
#define BSP_CH438_D6_PIN 33
#define BSP_CH438_D7_PIN 34
#define BSP_CH438_INT_PIN 35
#endif
extern int IoConfigInit(void);
#endif