1234567891011121314151617181920212223242526272829 |
- #ifndef __drv_iic_middle_h__
- #define __drv_iic_middle_h__
- #include <stdbool.h>
- #include <stdint.h>
- #include <string.h>
- #include "sdk_common.h"
- #include "SEGGER_RTT.h"
- #include "usr_config.h"
- #include "nrf_gpio.h"
- #define IIC_MIDDLE_SCL_SET nrf_gpio_pin_write(PIN_QMA7981_SCLK,1)
- #define IIC_MIDDLE_SCL_CLR nrf_gpio_pin_write(PIN_QMA7981_SCLK,0)
- #define IIC_MIDDLE_SDA_SET nrf_gpio_pin_write(PIN_QMA7981_SDA,1)
- #define IIC_MIDDLE_SDA_CLR nrf_gpio_pin_write(PIN_QMA7981_SDA,0)
- #define IIC_MIDDLE_SDA_READ nrf_gpio_pin_read(PIN_QMA7981_SDA)
- //#define IIC_MIDDLE_SCL_SET nrf_gpio_pin_write(PIN_QMC_LSM_FRONT_SCL,1)
- //#define IIC_MIDDLE_SCL_CLR nrf_gpio_pin_write(PIN_QMC_LSM_FRONT_SCL,0)
- //#define IIC_MIDDLE_SDA_SET nrf_gpio_pin_write(PIN_QMC_LSM_FRONT_SDA,1)
- //#define IIC_MIDDLE_SDA_CLR nrf_gpio_pin_write(PIN_QMC_LSM_FRONT_SDA,0)
- //#define IIC_MIDDLE_SDA_READ nrf_gpio_pin_read(PIN_QMC_LSM_FRONT_SDA)
- void IIC_MIDDLE_Init(void);
- bool IIC_MIDDLE_WriteBytes(uint8_t add,uint8_t reg,uint8_t* p,uint8_t len);
- bool IIC_MIDDLE_ReadBytes(uint8_t add,uint8_t reg,uint8_t* p,uint8_t len);
- #endif
|