Refresh C Programming

Convert void data-type (byte array) to uint8_t type static uint8_t notify_func(const void *data) { uint8_t value = ((uint8_t *)data)[7]; return value; } Structure data-type as function arguments static uint8_t notify_func(struct bt_gatt_subscribe_params *params) { printk("value_handle : %d", params->value_handle) } Declare enums as types typedef enum { STRING, NUMBERS, COMPLEX, DATATYPE_COUNT, INVALID_SENSOR } sensor_datatype_t; String initialisation to char pointer const char *p_mac_addr = "0C:8C:DC:41:E1:EF"; static void print_mac_addr(void) { printk("p_mac_addr : %s\n", p_mac_addr) } String as function return values...

November 11, 2023

Zephyr RTOS: Taking Your Embedded Projects to the Next Level

what is Zephyr? Zephyr RTOS is a game-changing technology developed by experts with decades of collective experience in the embedded world. Originally created as Rocket by Wind River Systems in 2015 and later rebranded as Zephyr, this open-source project has gained immense popularity since its inception. As an open-source project, anyone can access the source code and understand its internal workings. Over the years, Zephyr has garnered a lot of attention from major tech giants like Google, Meta, Intel, and many more, resulting in significant investments in the project....

March 24, 2023