Silicon Labs interview question

Implement an LBT algorith in C.