Anonymous
public text v1 · immutablevoid enable_ir()
{
int count = 0;
while(input(PIN_IR_EN_n) && (count < 100)) {
output_low(PIN_IR_EN_n);
delay_ms(1);
count++;
}
if (input(PIN_IR_EN_n)) {
printf("ERROR: could not enable IR\r\n");
}
}