-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.h
More file actions
82 lines (68 loc) · 2.21 KB
/
Copy pathtemplate.h
File metadata and controls
82 lines (68 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/******************************************************************************
* @file template.h
* @brief Brief description of this module
* @layer [APP | CONTROL | DRIVER | MCU-PERIPHERALS]
*
* @description
* Detailed description of the module's purpose and functionality.
* Explain what this module does and its role in the system.
*
*****************************************************************************/
#ifndef TEMPLATE_H
#define TEMPLATE_H
/******************************************************************************
* Includes
*****************************************************************************/
#include <stdbool.h>
#include <stdint.h>
/******************************************************************************
* Public Constants
*****************************************************************************/
#define TEMPLATE_CONSTANT_NAME 100
/******************************************************************************
* Public Types
*****************************************************************************/
/**
* @brief Example enumeration
*/
typedef enum
{
TEMPLATE_STATE_IDLE = 0,
TEMPLATE_STATE_ACTIVE = 1,
TEMPLATE_STATE_ERROR = 2
} template_state_t;
/**
* @brief Example structure
*/
typedef struct
{
uint32_t counter;
bool enabled;
template_state_t state;
} template_config_t;
/******************************************************************************
* Public Function Prototypes
*****************************************************************************/
/**
* @brief Initialize the module
* @return true if initialization successful, false otherwise
*/
bool template_init(void);
/**
* @brief Main processing function
* @details Called periodically from main loop
*/
void template_run(void);
/**
* @brief Get module status
* @param[out] status Pointer to status structure
* @return true if status retrieved successfully, false otherwise
*/
bool template_get_status(template_config_t* status);
/**
* @brief Set module configuration
* @param[in] config Pointer to configuration structure
* @return true if configuration successful, false otherwise
*/
bool template_set_config(const template_config_t* config);
#endif // TEMPLATE_H