bool ht_color_perform_calibration(U32 sensor, U8 mode) { U8 str[1] = { mode }; switch (mode) { case HT_COLOR_CAL_WHITEPOINT: case HT_COLOR_CAL_BLACKPOINT: return (nx_i2c_memory_write(sensor, HT_COLOR_COMMAND, str, 1) == I2C_ERR_OK); break; default: nx_display_string("Unknown Cal. Command!\n"); nx_systick_wait_ms(1000); return FALSE; break; } }
/** Writes the given buffer into the radar's memory slot. */ bool nx_radar_write(U32 sensor, radar_memory_slot slot, U8 *val) { const struct radar_cmd_info *cmd = &radar_cmds[slot]; return nx_i2c_memory_write(sensor, cmd->addr, val, cmd->len) == I2C_ERR_OK; }