Files
VivaMyo-firmware-test/project/ble_peripheral/ble_app_vivaMayo/cat_i2c.h
2026-04-08 16:59:20 +09:00

51 lines
1.0 KiB
C

/*******************************************************************************
* @file ir_i2c.h
* @date 2024-07-17
******************************************************************************/
#ifndef _CAT_I2C_H_
#define _CAT_I2C_H_
#include "sdk_common.h"
#include <stdbool.h>
#include "nrf.h"
#include "nrf_drv_gpiote.h"
#define CAT_I2C_INSTANCE 0 /**< I2C instance index. */
#define CAT_I2C_SDA_PIN NRF_GPIO_PIN_MAP(1,15)
#define CAT_I2C_SCL_PIN NRF_GPIO_PIN_MAP(1,14)
//#define IR_I2C_SDA_PIN NRF_GPIO_PIN_MAP(0,25)
//#define IR_I2C_SCL_PIN NRF_GPIO_PIN_MAP(1,0)
/**
* COMMAND CONSTANTS
* Commands are 16-bit writes: bits 15:14 are 0s
* Bits 13:10 are the command value below
* Bits 9:0 are data for the command, but not all bits are used with all commands
*/
void cat_i2c_uninit(void);
void cat_i2c_init(void);
uint8_t cat_command_read(uint8_t device_id, uint8_t address, uint8_t *data);
void cat_command_write(uint8_t device_id, uint8_t address, uint8_t *data);
#endif /* !_ADA5272_I2C_H_ */