Skip to content
Snippets Groups Projects
Commit d462ccef authored by q3k's avatar q3k
Browse files

usermodule/audio: fix build on p1

parent de8c3d5d
No related branches found
No related tags found
No related merge requests found
Pipeline #5656 passed
......@@ -251,9 +251,15 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(mp_input_thru_get_mute_obj, mp_input_thru_get_m
STATIC mp_obj_t mp_codec_i2c_write(mp_obj_t reg_in, mp_obj_t data_in) {
#if defined(CONFIG_BADGE23_HW_GEN_P3) || defined(CONFIG_BADGE23_HW_GEN_P4) || defined(CONFIG_BADGE23_HW_GEN_P6)
uint8_t reg = mp_obj_get_int(reg_in);
uint8_t data = mp_obj_get_int(data_in);
audio_codec_i2c_write(reg, data);
#elif defined(CONFIG_BADGE23_HW_GEN_P1)
mp_raise_NotImplementedError(MP_ERROR_TEXT("not implemented for p1 badges"));
#else
#error "audio not implemented for this badge generation"
#endif
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(mp_codec_i2c_write_obj, mp_codec_i2c_write);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment