Tool/software: TI C/C++ Compiler
Hello.
Is it possible to write code in C without checking the "if" condition?
With the use of interrupts, such as is done eg in AVR microcontrollers (handler function)?
for illustration:
while (1){
/* Check bit 30 of register R31 to see if the ARM has kicked us */
if (__R31 & HOST_INT) {
/* Clear the event status */
CT_INTC.SICR_bit.STS_CLR_IDX = FROM_ARM_HOST;
/* Receive all available messages, multiple messages can be sent per kick */
while (pru_rpmsg_receive(&transport, &src, &dst, payload, &len) == PRU_RPMSG_SUCCESS) {
/* Echo the message back to the same address from which we just received */
pru_rpmsg_send(&transport, dst, src, payload, len);
}
}
}