Siegurd

Untitled

Aug 16th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. void print_chanel_values_raw(uint8_t RX_spi_0,uint8_t RX_spi_1,uint8_t RX_spi_2,uint8_t RX_spi_3){
  2. int adcRawValues = (RX_spi_1 << 16) | (RX_spi_2 << 8) | (RX_spi_3 << 0);
  3. uint8_t channelId = GET_BIT(RX_spi_0, 4) + GET_BIT(RX_spi_0, 5) * 2 + GET_BIT(RX_spi_0, 6) * 4;
  4. printf("HEADER: %hhX CH: %d Value: %d\n", RX_spi_0, channelId, adcRawValues);
  5. }
  6.  
Advertisement
Add Comment
Please, Sign In to add comment