• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 /*
4  * Parameters for use with mSBC over eSCO link
5  */
6 
7 #define MSBC_H2_ID0	0x01
8 #define MSBC_H2_ID1	0x08
9 #define MSBC_FRAME_SIZE	57
10 
11 #define MSBC_SYNC_BYTE	0xad
12 
13 struct msbc_h2_id1_s {
14     uint8_t id1:4;
15     uint8_t sn0:2;
16     uint8_t sn1:2;
17 } __attribute__ ((packed));
18 
19 union msbc_h2_id1 {
20     struct msbc_h2_id1_s s;
21     uint8_t b;
22 };
23 
24 struct msbc_h2_header {
25     uint8_t id0;
26     union msbc_h2_id1 id1;
27 } __attribute__ ((packed));
28 
29 struct msbc_frame {
30     struct msbc_h2_header hdr;
31     uint8_t payload[MSBC_FRAME_SIZE];
32     uint8_t padding;		/* must be zero */
33 } __attribute__ ((packed));
34 
35 #define MSBC_PACKET_SIZE	sizeof(struct msbc_frame)
36