45 #ifndef BSPACM_DEVICE_NRF51_INTERNAL_PERIPH_TWI_H
46 #define BSPACM_DEVICE_NRF51_INTERNAL_PERIPH_TWI_H
57 #define BSPACM_NRF_TWI_BUS_ERROR_TIMEOUT 0x100
62 #define BSPACM_NRF_TWI_BUS_ERROR_CLEAR_FAILED 0x200
67 #define BSPACM_NRF_TWI_BUS_ERROR_UNKNOWN 0x400
69 #ifndef BSPACM_NRF_APPLY_PAN_36
77 #define BSPACM_NRF_APPLY_PAN_36 1
80 #ifndef BSPACM_NRF_APPLY_PAN_56
95 #define BSPACM_NRF_APPLY_PAN_56 1
100 #define BSPACM_I2C_MINIMUM_BUS_TIMEOUT_us 100
142 #if (BSPACM_NRF_APPLY_PAN_36 - 0)
197 unsigned int timeout_us);
int iBSPACMi2cSetEnabled(hBSPACMi2cBus tpp, bool enabled)
uint32_t frequency
Definition: twi.h:134
int iBSPACMi2cWrite(hBSPACMi2cBus tpp, unsigned int addr, const uint8_t *sp, size_t len)
uint8_t scl_pin
Definition: twi.h:140
const sBSPACMi2cBus * hBSPACMi2cBus
Definition: twi.h:150
Common header included by all BSPACM leaf headers.
NRF_TWI_Type * twi
Definition: twi.h:104
uint8_t sda_pin
Definition: twi.h:137
int iBSPACMi2cRead(hBSPACMi2cBus tpp, unsigned int addr, uint8_t *dp, size_t len)
unsigned int timeout_utt
Definition: twi.h:130
hBSPACMi2cBus hBSPACMi2cConfigureBus(sBSPACMi2cBus *tpp, NRF_TWI_Type *twi, int sda_pin, int scl_pin, int ppi_chidx, uint32_t frequency, unsigned int timeout_us)
int8_t ppi_chidx
Definition: twi.h:145