#ifndef __drv_iic_01_h__ #define __drv_iic_01_h__ #include #include #include #include "sdk_common.h" #include "SEGGER_RTT.h" #include "usr_config.h" #include "nrf_gpio.h" #define IIC_01_SCL_SET nrf_gpio_pin_write(PIN_SCL_MAG,1) #define IIC_01_SCL_CLR nrf_gpio_pin_write(PIN_SCL_MAG,0) #define IIC_01_SDA_SET nrf_gpio_pin_write(PIN_SDA_BACK,1) #define IIC_01_SDA_CLR nrf_gpio_pin_write(PIN_SDA_BACK,0) #define IIC_01_SDA_READ nrf_gpio_pin_read(PIN_SDA_BACK) void IIC_01_Init(void); bool IIC_01_WriteBytes(uint8_t add,uint8_t reg,uint8_t* p,uint8_t len); bool IIC_01_ReadBytes(uint8_t add,uint8_t reg,uint8_t* p,uint8_t len); #endif