Added Naming Convetions
This commit is contained in:
parent
d0ff63783f
commit
c656d4afd7
26
readme.md
26
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
|
# UART Protokoll
|
||||||
|
|
||||||
## Struktur einer Nachricht
|
## Struktur einer Nachricht
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user