[Bak] 备份 驱动移植 23.07.22
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
**********************************************************************************
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "ebyte_conf.h"
|
||||
|
||||
#if defined(EBYTE_E48_433M20S)||defined(EBYTE_E48_900M20S)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "ebyte_conf.h"
|
||||
#include "stm8l15x.h"
|
||||
//#include "stm8l15x.h"
|
||||
//typedef unsigned char uint8e_t;
|
||||
//typedef unsigned short uint16e_t;
|
||||
//typedef unsigned long uint32e_t;
|
||||
|
||||
@ -41,12 +41,6 @@ void Ebyte_BSP_HSI_Init(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Ebyte_BSP_E48xGPIO_Init(void)
|
||||
{
|
||||
// GPIO_Init( BSP_GPIO_PORT_E48_GP0, BSP_GPIO_PIN_E48_GP0, GPIO_Mode_In_PU_No_IT );
|
||||
@ -304,7 +298,7 @@ void Ebyte_BSP_UartTransmit( uint8_t *buffer , uint16_t length )
|
||||
|
||||
for( i = 0; i < length; i++ )
|
||||
{
|
||||
while ( USART_GetFlagStatus( USART1, USART_FLAG_TXE ) == RESET );
|
||||
while ( USART_GetFlagStatus( USART1, USART_FLAG_TBE ) == RESET );
|
||||
USART_SendData8( USART1, *buffer++ );
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,57 +19,59 @@
|
||||
**********************************************************************************
|
||||
*/
|
||||
|
||||
#include "stm8l15x_conf.h"
|
||||
#include <stdint.h>
|
||||
//#include "stm8l15x_conf.h"
|
||||
#include "gd32w51x.h"
|
||||
#include "board_mini_printf.h"
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> LED */
|
||||
#define BSP_GPIO_PORT_LED_1 GPIOC
|
||||
#define BSP_GPIO_PIN_LED_1 GPIO_Pin_6
|
||||
#define BSP_GPIO_PIN_LED_1 GPIO_PIN_6
|
||||
|
||||
#define BSP_GPIO_PORT_LED_2 GPIOC
|
||||
#define BSP_GPIO_PIN_LED_2 GPIO_Pin_5
|
||||
#define BSP_GPIO_PIN_LED_2 GPIO_PIN_5
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
#define BSP_GPIO_PORT_BUTTON_1 GPIOA
|
||||
#define BSP_GPIO_PIN_BUTTON_1 GPIO_Pin_4
|
||||
#define BSP_GPIO_PIN_BUTTON_1 GPIO_PIN_4
|
||||
|
||||
#define BSP_GPIO_PORT_BUTTON_2 GPIOA
|
||||
#define BSP_GPIO_PIN_BUTTON_2 GPIO_Pin_5
|
||||
#define BSP_GPIO_PIN_BUTTON_2 GPIO_PIN_5
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SPIͨ<49>Žӿ<C5BD> */
|
||||
#define BSP_GPIO_PORT_SPI_NSS GPIOB
|
||||
#define BSP_GPIO_PIN_SPI_NSS GPIO_Pin_4
|
||||
#define BSP_GPIO_PIN_SPI_NSS GPIO_PIN_4
|
||||
|
||||
#define BSP_GPIO_PORT_SPI_MOSI GPIOB
|
||||
#define BSP_GPIO_PIN_SPI_MOSI GPIO_Pin_6
|
||||
#define BSP_GPIO_PIN_SPI_MOSI GPIO_PIN_6
|
||||
|
||||
#define BSP_GPIO_PORT_SPI_MISO GPIOB
|
||||
#define BSP_GPIO_PIN_SPI_MISO GPIO_Pin_7
|
||||
#define BSP_GPIO_PIN_SPI_MISO GPIO_PIN_7
|
||||
|
||||
#define BSP_GPIO_PORT_SPI_SCK GPIOB
|
||||
#define BSP_GPIO_PIN_SPI_SCK GPIO_Pin_5
|
||||
#define BSP_GPIO_PIN_SPI_SCK GPIO_PIN_5
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ͨ<>Ŵ<EFBFBD><C5B4><EFBFBD> */
|
||||
#define BSP_GPIO_PORT_UART_TX GPIOA
|
||||
#define BSP_GPIO_PIN_UART_TX GPIO_Pin_2
|
||||
#define BSP_GPIO_PIN_UART_TX GPIO_PIN_2
|
||||
|
||||
#define BSP_GPIO_PORT_UART_RX GPIOA
|
||||
#define BSP_GPIO_PIN_UART_RX GPIO_Pin_3
|
||||
#define BSP_GPIO_PIN_UART_RX GPIO_PIN_3
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> EBYTE<54><45><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
|
||||
|
||||
/* E48 */
|
||||
#define BSP_GPIO_PORT_E48_GP0 GPIOC
|
||||
#define BSP_GPIO_PIN_E48_GP0 GPIO_Pin_1
|
||||
#define BSP_GPIO_PIN_E48_GP0 GPIO_PIN_1
|
||||
#define BSP_GPIO_PORT_E48_NIRQ GPIOD
|
||||
#define BSP_GPIO_PIN_E48_NIRQ GPIO_Pin_4
|
||||
#define BSP_GPIO_PIN_E48_NIRQ GPIO_PIN_4
|
||||
#define BSP_GPIO_PORT_E48_GP3 GPIOC
|
||||
#define BSP_GPIO_PIN_E48_GP3 GPIO_Pin_3
|
||||
#define BSP_GPIO_PIN_E48_GP3 GPIO_PIN_3
|
||||
#define BSP_GPIO_PORT_E48_GP4 GPIOC
|
||||
#define BSP_GPIO_PIN_E48_GP4 GPIO_Pin_1
|
||||
#define BSP_GPIO_PIN_E48_GP4 GPIO_PIN_1
|
||||
#define BSP_GPIO_PORT_E48_GP5 GPIOC
|
||||
#define BSP_GPIO_PIN_E48_GP5 GPIO_Pin_2
|
||||
#define BSP_GPIO_PIN_E48_GP5 GPIO_PIN_2
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "stdarg.h"
|
||||
#include "stm8l15x_usart.h"
|
||||
//#include "stm8l15x_usart.h"
|
||||
#include "board_mini_printf.h"
|
||||
|
||||
/* !
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
|
||||
#define __RADIO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "radio_phy.h"
|
||||
#include "radio_mac.h"
|
||||
#include "CMT2310A_def.h"
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#define __RADIO_HAL_H
|
||||
|
||||
#include "stm8l15x.h"
|
||||
//#include "stm8l15x.h"
|
||||
#include "ebyte_port.h"
|
||||
|
||||
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#ifndef __RADIO_PHY_H
|
||||
|
||||
#define __RADIO_PHY_H
|
||||
#include "stm8l15x.h"
|
||||
//#include "stm8l15x.h"
|
||||
#include "gd32w51x.h"
|
||||
#include "radio_hal.h"
|
||||
#include "CMT2310A_def.h"
|
||||
#include "CMT2310A_reg.h"
|
||||
|
||||
@ -2,7 +2,8 @@
|
||||
|
||||
#define __RADIO_SPI_H
|
||||
|
||||
#include "stm8l15x.h"
|
||||
//#include "stm8l15x.h"
|
||||
#include "gd32w51x.h"
|
||||
|
||||
#include "ebyte_port.h"
|
||||
extern void vSpiMasterInit( void );
|
||||
|
||||
@ -93,7 +93,7 @@
|
||||
/* Comment the line below if you will not use the peripherals drivers.
|
||||
In this case, these drivers will not be included and the application code will be
|
||||
based on direct access to peripherals registers */
|
||||
#define USE_STDPERIPH_DRIVER
|
||||
// #define USE_STDPERIPH_DRIVER
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@ -28,8 +28,8 @@
|
||||
#define __STM8L15x_USART_H
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm8l15x.h"
|
||||
#include "stm8l15x_clk.h"
|
||||
//#include "stm8l15x.h"
|
||||
//#include "stm8l15x_clk.h"
|
||||
|
||||
/** @addtogroup STM8L15x_StdPeriph_Driver
|
||||
* @{
|
||||
|
||||
Reference in New Issue
Block a user