Skip to content
Snippets Groups Projects
Select Git revision
  • 9f27f1aa47b925aed544b171a0924a7223cca1fa
  • master default
  • remove-matefun-graf-from-angular
  • pg-moodle-integration-main
  • feature/discontinuidades
  • feature/i18n-with-routes
  • develop
  • feature/functions-information
  • feature/editor-improvements
  • feature/add-in18-frontend
  • feature/integration-graph-2d-3d
  • feature/3DComponentInitialization
  • graficas-componente
  • feature/codeMatchBrackets
  • v2.0
  • v1.0
16 results

package.json

Blame
  • Forked from matefun / Frontend
    Source project has a limited visibility.
    This project manages its dependencies using npm. Learn more
    package.json 1.56 KiB
    #ifndef TIMER_H
    #define	TIMER_H
    
    #include "driver/timer.h"
    #include <stdint.h>
    #include "esp_err.h"
    
    
    #define CONFIG_HWTIMER_THREAD_STACK_SIZE 8192
    #define CONFIG_HWTIMER_THREAD_PRIORITY 10
    #define CPU_LAST_TIMER 3
    #define CPU_FIRST_TIMER 0
    
    
    typedef struct{
    	int8_t unit;
    } tmr_alarm_t;
    
    typedef struct {
    	uint8_t setup;
    	void (*callback)(void *);
    	timer_isr_handle_t isrh;
    } tmr_t;
    
    typedef void(*tmr_isr_t)(void *);
    
    /**
     * @brief Configures a timer. After timer is configured you must start timer using
     * 		  tmr_start function.  No sanity checks are done (use only in driver develop).
     *
     * @param unit Hardware timer, from 0 to 3.
     * @param micros Period of timer, in microseconds.
     * @param callback Callback function to call every micros period.
     * @param deferred If 0, the callback are executed in the isr. If 1, the callback
     *                 is deferred and is called outside the interrupt. Non deferred
     *                 callbacks must reside in IRAM.
     *
     * @return 0 if success, -1 if error (memory error)
     *
     */
    int tmr_ll_setup(uint8_t unit, uint32_t micros, void(*callback)(void *));
    
    /**
     * @brief Removes a timer and the resources that uses.
     * 		  tmr_start function.  No sanity checks are done (use only in driver develop).
     *
     * @param unit Hardware timer, from 0 to 3.
     */
    void tmr_ll_unsetup(uint8_t unit);
    
    /**
     * @brief Start a previous configured timer. No sanity checks are done (use only in driver develop).
     *
     * @param unit Hardware timer, from 0 to 3.
     */
    void tmr_ll_start(uint8_t unit);
    
    /**
     * @brief Stop a previous configured timer. No sanity checks are done (use only in driver develop).
     *
     * @param unit Hardware timer, from 0 to 3.
     */
    void tmr_ll_stop(uint8_t unit);
    
    /**
     * @brief Configures a timer. After timer is configured you must start timer using
     * 		  tmr_start function.
     *
     * @param unit Hardware timer, from 0 to 3.
     * @param micros Period of timer, in microseconds.