1 main thread, Hread – IEI Integration HDC-3x-Series_SDK_Linux User Manual
Page 31
HDC-3x Series SDK (Linux)
Page 31
2.1 Main Thread
Step 1:
Initialize global variables (FmbInitInfo).
Step 2:
Set the default of all devices (FmbCreatDevInfoAll) and create a thread for each
device (fmbRecvThread). This thread will receive Events sent by codec chip,
and send the message to the main thread through the pipe.
Step 3:
Write firmware to the codec chip and boot codec chip (DrvBootAll).
Step 4:
Read the current version of the codec chip (CheckVersionInfo).
Step 5:
Set the audio compression format supported by the current version of the codec
chip (FmbCheckAudioFormatAll).
Step 6:
Initialize the screen (InitScreens).
Step 7:
Wait for the keyboard input and execute the commands of the codec chip setting
(OnStdinInput)
Step 8:
Receive the message sent by FmbRecvThread. Determine the current state of
the codec chip and execute the corresponding actions (OnFmbMessage).
Step 9:
Determine whether the device setup is completed and go to next step
(OnFmbRequestResponse).
Step 10:
Repeat
Step 7
~
Step 9
.