Skip to content

Commit 3de9d36

Browse files
committed
macro:fix rename lifesensor_macro to lifesensor_common
1 parent 6a680cc commit 3de9d36

File tree

9 files changed

+15
-13
lines changed

9 files changed

+15
-13
lines changed
File renamed without changes.

components/lifesensor_macro/README.md renamed to components/lifesensor_common/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# Lifesensor Macro component
1+
# Lifesensor common component
22
For ease of declaration and definition of groups of tasks and queues the *lifesensor_macros* offer a set of easy to use task and queue creation shortcuts.
33

4-
## Concept
4+
## Macros
5+
6+
### Concept
57
The `LIFESENSOR_TASK()` and `LIFESENSOR_QUEUE()` macro offer an easy interface to descibe the struct for a functional unit of the lifesensor. Each task or queue created with these shortcuts have to be initialized with the `lifesensor_task_init()` and respectively the `lifesensor_queue_init()` function.
68

79
`LIFESENSOR_TASK(stacksize)`
@@ -17,7 +19,7 @@ Initiazes a task created with `LIFESENSOR_TASK()` by passing in a pointer to it
1719
Initalizes a queue created with `LIFESENSOR_QUEUE()` by passing in a pointer to it as first argument. Generally this function should be called before passing a queue to i.e. a task as argument.
1820

1921

20-
## Examples
22+
### Examples
2123
```C
2224
typedef struct {
2325
LIFESENSOR_QUEUE(spo2_adc_sample_t, 16) adc_queue;
@@ -43,5 +45,5 @@ void app_main()
4345

4446
```
4547

46-
## Related
48+
### Related
4749
none
File renamed without changes.
File renamed without changes.

components/spo2/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ idf_component_register(
55
include
66
REQUIRES
77
ulp_adc
8-
lifesensor_macro
8+
lifesensor_common
99
)
1010

1111
# COMPONENT COMPILE FLAGS

components/spo2/include/spo2.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <freertos/queue.h>
77

88
#include "spo2_driver.h"
9-
#include "macro_task.h"
10-
#include "macro_queue.h"
9+
#include "macro/task.h"
10+
#include "macro/queue.h"
1111

1212

1313
/**
@@ -49,6 +49,6 @@ typedef struct {
4949
*
5050
* The function initializes queues and tasks of the spo2 unit.
5151
*/
52-
void lifesensor_spo2_init(spo2_t *spo2);
52+
void lifesensor_spo2_init(spo2_t *spo2, const char *name);
5353

5454
#endif

components/spo2/src/spo2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include "spo2.h"
1010
#include "spo2_driver.h"
1111
#include "spo2_filter.h"
12-
#include "macro_queue.h"
12+
#include "macro/queue.h"
1313

1414

1515
/**
@@ -24,12 +24,12 @@ static void spo2_runner(void *pvParameters);
2424

2525
void
2626
lifesensor_spo2_init
27-
(spo2_t *spo2)
27+
(spo2_t *spo2, const char *name)
2828
{
2929
lifesensor_queue_init(&spo2->adc_queue);
3030
lifesensor_task_init(
3131
&spo2->adc_task,
32-
"spo2_adc",
32+
name,
3333
spo2_runner,
3434
&spo2->adc_queue.queue,
3535
tskIDLE_PRIORITY

components/ulp_adc/src/ulp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "spo2.h"
66
#include "ulp.h"
7-
#include "macro_queue.h"
7+
#include "macro/queue.h"
88

99

1010
/*

lifesensor/main/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ spo2_t spo2;
1818
*/
1919
void app_main()
2020
{
21-
lifesensor_spo2_init(&spo2);
21+
lifesensor_spo2_init(&spo2, "SpO2");
2222
ulp_init(&spo2.adc_queue.queue);
2323
}

0 commit comments

Comments
 (0)