I have an Enum in C like the following:
typedef enum {
idle,
backup,
charge,
} ENUM_LUMI_STATE;
and I have the following function:
ENUM_LUMI_STATE controllerGetState(void) {
return idle;
}
I want to print it here:
printf("the current status of the system is %s \r\n", controllerGetState());
The resul is Obscure as you can see here:
the current status of the system is þq st
I want to print the current status of the system is "idle". Could you please tell me how?