ttn-esp32/src/hal/hal_esp32.h
Manuel Bleichenbacher 0f97ce4e0f Reorganize directories
2018-10-02 20:25:40 +02:00

45 lines
958 B
C

/*******************************************************************************
*
* ttn-esp32 - The Things Network device library for ESP-IDF / SX127x
*
* Copyright (c) 2018 Manuel Bleichenbacher
*
* Licensed under MIT License
* https://opensource.org/licenses/MIT
*
* Hardware abstraction layer to run LMIC on a ESP32 using ESP-iDF.
*******************************************************************************/
#ifndef _hal_esp32_h_
#define _hal_esp32_h_
#include <stdint.h>
#include "driver/spi_master.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct lmic_pinmap {
spi_host_device_t spi_host;
uint8_t nss;
uint8_t rxtx;
uint8_t rst;
uint8_t dio0;
uint8_t dio1;
} lmic_pinmap;
extern lmic_pinmap lmic_pins;
void hal_startBgTask();
void hal_wakeUp();
void hal_initCriticalSection();
void hal_enterCriticalSection();
void hal_leaveCriticalSection();
#ifdef __cplusplus
}
#endif
#endif // _hal_esp32_h_