GitJer / Some-Sipeed-MAIX-GO-k210-stuff

45 stars 14 forks source link

what is I2S channel mask? #5

Closed alirezainallo closed 1 year ago

alirezainallo commented 1 year ago

https://github.com/GitJer/Some-Sipeed-MAIX-GO-k210-stuff/blob/8d14914381ae66086656d2ec31a30f3e571f583e/src/mics_and_lights_on_array/main.c#L93

Hi. in what is "channel_mask" in this line?

alirezainallo commented 1 year ago

this is 0x3 (0b11) for even channel, for example: channel0_mask: 0x03 (0b00000011) channel1_mask: 0x0c (0b00001100) channel2_mask: 0x30 (0b00110000) channel3_mask: 0xc0 (0b11000000)

if you want use both just need to OR them (ex: (channel0_mask | channel1_mask) is for channel 0 and 1 together)