mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-15 15:00:02 +01:00
examples: Standardise naming of files, symbols, etc. in examples
* Use "example" in all example function & variable names, ie use i2c_example_xxx instead of i2c_xxx for example functions. Closes #198 https://github.com/espressif/esp-idf/issues/198 * Mark example functions, etc. static * Replace uses of "test" & "demo" with "example" * Split the UART example into two * Rename "main" example files to end with "_main.c" for disambiguation
This commit is contained in:
@@ -44,7 +44,7 @@ static void inline print_u64(uint64_t val)
|
||||
printf("0x%08x%08x\n", (uint32_t) (val >> 32), (uint32_t) (val));
|
||||
}
|
||||
|
||||
void timer_evt_task(void *arg)
|
||||
static void timer_example_evt_task(void *arg)
|
||||
{
|
||||
while(1) {
|
||||
timer_event_t evt;
|
||||
@@ -135,7 +135,7 @@ void IRAM_ATTR timer_group0_isr(void *para)
|
||||
/*
|
||||
* @brief timer group0 hardware timer0 init
|
||||
*/
|
||||
void tg0_timer0_init()
|
||||
static void example_tg0_timer0_init()
|
||||
{
|
||||
int timer_group = TIMER_GROUP_0;
|
||||
int timer_idx = TIMER_0;
|
||||
@@ -165,7 +165,7 @@ void tg0_timer0_init()
|
||||
/*
|
||||
* @brief timer group0 hardware timer1 init
|
||||
*/
|
||||
void tg0_timer1_init()
|
||||
static void example_tg0_timer1_init()
|
||||
{
|
||||
int timer_group = TIMER_GROUP_0;
|
||||
int timer_idx = TIMER_1;
|
||||
@@ -198,8 +198,8 @@ void tg0_timer1_init()
|
||||
void app_main()
|
||||
{
|
||||
timer_queue = xQueueCreate(10, sizeof(timer_event_t));
|
||||
tg0_timer0_init();
|
||||
tg0_timer1_init();
|
||||
xTaskCreate(timer_evt_task, "timer_evt_task", 2048, NULL, 5, NULL);
|
||||
example_tg0_timer0_init();
|
||||
example_tg0_timer1_init();
|
||||
xTaskCreate(timer_example_evt_task, "timer_evt_task", 2048, NULL, 5, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user