1 Reply Latest reply on May 8, 2020 12:36 AM by DheerajP_41

    Convert enum value to string for more readable terminal output


        Currently, I use something like this: WPRINT_APP_INFO( ( "wiced_bt_ble_set_advertisement_data %d\n", result ) );

      that would output the following to the terminal: "wiced_bt_ble_set_advertisement_data 0"

      Then I have to figure out what the value 0 represents in the enum where it's declared.

      Is there a function that could convert the numerical value back to the string its equal to?

      I would like to see something like this: "wiced_bt_ble_set_advertisement_data WICED_SUCCESS"