generated from hulk/gd32e23x_template
Merge remote-tracking branch 'origin/feature-rs485' into dev
# Conflicts: # inc/rs485.h # src/gd32e23x_it.c # src/rs485.c
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#define I2C_SPEED 20000
|
||||
#define RCU_GPIO_I2C RCU_GPIOF
|
||||
#define RCU_I2C RCU_I2C0
|
||||
@@ -24,11 +26,15 @@
|
||||
#define I2C_SDA_PIN GPIO_PIN_0
|
||||
#define I2C_GPIO_AF GPIO_AF_1
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
#define I2C_TIME_OUT (uint16_t)(10000)
|
||||
#define I2C_OK 1
|
||||
#define I2C_FAIL 0
|
||||
#define I2C_END 1
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
typedef enum {
|
||||
I2C_START = 0,
|
||||
I2C_SEND_ADDRESS,
|
||||
@@ -37,6 +43,8 @@ typedef enum {
|
||||
I2C_STOP
|
||||
} i2c_process_enum;
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
void i2c_gpio_config(void);
|
||||
|
||||
void i2c_config(void);
|
||||
|
Reference in New Issue
Block a user