2 #if RUUVI_NRF5_SDK15_ENABLED
18 #include "nrf_drv_twi.h"
22 if (NRF_SUCCESS == err_code) {
return RD_SUCCESS; }
36 if (NRF_ERROR_MODULE_ALREADY_INITIALIZED == err_code)
59 if (NRF_ERROR_DRV_TWI_ERR_DNACK == err_code ||
60 NRF_ERROR_DRV_TWI_ERR_ANACK == err_code)
#define RD_ERROR_INVALID_PARAM
Invalid Parameter.
#define RD_ERROR_NULL
Null Pointer.
uint32_t rd_status_t
bitfield for representing errors
#define RD_ERROR_INVALID_LENGTH
Invalid Length.
rd_status_t ruuvi_nrf5_sdk15_to_ruuvi_error(const ret_code_t error)
convert nrf5 sdk15 error code into Ruuvi error code.
#define RD_ERROR_FORBIDDEN
Forbidden Operation.
#define RD_ERROR_RESOURCES
Not enough resources for operation.
#define RD_ERROR_NOT_SUPPORTED
Not supported.
#define RD_SUCCESS
Internal Error.
#define RD_ERROR_NOT_ACKNOWLEDGED
Ack was expected but not received.
#define RD_ERROR_DATA_SIZE
Invalid Data size.
#define RD_ERROR_NO_MEM
No Memory for operation.
#define RD_ERROR_TIMEOUT
Operation timed out.
#define RD_ERROR_INVALID_FLAGS
Invalid Flags.
#define RD_ERROR_NOT_FOUND
Not found.
#define RD_ERROR_INVALID_STATE
Invalid state, operation disallowed in this state.
#define RD_ERROR_INTERNAL
Internal Error.
#define RD_ERROR_BUSY
Busy.
#define RD_ERROR_INVALID_ADDR
Bad Memory Address.
Header to enable and disable module compilation.
Ruuvi error codes and error check function.