uint32_t portdb_init(uint32_t max_ports) { uint32_t err_code = NRF_SUCCESS; m_portdb_len = max_ports; m_portdb = nrf_malloc(db_size_get()); if (m_portdb == NULL) { err_code = NRF_ERROR_NO_MEM; } else { db_reset(); } return err_code; }
/**@brief malloc() function definition. */ static void * malloc_fn_hook(size_t sz) { return nrf_malloc(sz); }