diff --git a/readme.md b/readme.md index 94f1fd0..5fa16aa 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,29 @@ +# Convetions + +## Naming + +### Filenames: snake_case (ota_master.c, ota_slave.c, com_handler.c) + +### Functions: module_submodule_action() +- OTA Master = ota_m_send_chunk(), ota_m_init() +- OTA Slave = ota_s_handle_chunk(), ota_s_prepare_flash() +- com_init(), msg_parse() + +### Variables: +- Global: g_ (g_client_list) +- Statics: s_ (s_update_handle) +- Constants: UPPER_SNAKE_CASE (UPDATE_BUFFER_SIZE) + +### Types: +- Typedefs: Ends with _t (ota_payload_t) +- Struct-Tags: Ends with _t or spezifik name (struct ota_context) +- Unions: Ends with _u (msg_payload_u) +- Callbacks: End with _cb (com_m_rx_cb) + +### FreeRTOS-Objects +- x for Basetypes (x_ota_queue, x_status_semaphor) +- v for void return (v_ota_task) + # UART Protokoll ## Struktur einer Nachricht