IoT25S IoT Klocka 0.1
Grupparbete för IoT25S på Jensen YH
Loading...
Searching...
No Matches
alarm_service.h File Reference

Alarm scheduling service API. More...

#include "esp_err.h"
+ Include dependency graph for alarm_service.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

esp_err_t alarm_service_start (void)
 Start the alarm service task.
 

Detailed Description

Alarm scheduling service API.

Definition in file alarm_service.h.

Function Documentation

◆ alarm_service_start()

esp_err_t alarm_service_start ( void  )

Start the alarm service task.

Returns
ESP_OK on success, otherwise an ESP_ERR_* code.

Definition at line 88 of file alarm_service.c.

89{
90 gpio_config_t gpio_cfg = {
91 .pin_bit_mask = (1ULL << BUZZER_GPIO_PIN),
92 .mode = GPIO_MODE_OUTPUT,
93 .pull_up_en = GPIO_PULLUP_DISABLE,
94 .pull_down_en = GPIO_PULLDOWN_DISABLE,
95 .intr_type = GPIO_INTR_DISABLE,
96 };
97
98 ESP_RETURN_ON_ERROR(gpio_config(&gpio_cfg), TAG, "GPIO config failed");
99 gpio_set_level((gpio_num_t)BUZZER_GPIO_PIN, 0);
100
101 BaseType_t task_ok = xTaskCreate(alarm_service_task, "alarm_task", 4096, NULL, 5, NULL);
102
103 return (task_ok == pdPASS) ? ESP_OK : ESP_FAIL;
104}
static const char * TAG
static void alarm_service_task(void *arg)
#define BUZZER_GPIO_PIN
+ Here is the call graph for this function:
+ Here is the caller graph for this function: