b-parasite-esp32/code/b-parasite/config/prst_config.h
rbaron fb07a1244c PWM start/stop in RTC callback.
I initially tried calling prst_pwm_init() in main(), and just using start/stop in
the callback, but that led to a weird behavior in the PWM output. It was set to
high after the end of the callback.

Callnig uninit/re-calling init() inside the RTC callback fixed, but more investigation
is required.
2021-03-14 15:03:33 +01:00

18 lines
No EOL
310 B
C

#ifndef _PRST_CONFIG_H_
#define _PRST_CONFIG_H_
#include "nrf_gpio.h"
// Built-in LED.
#define PRST_LED_PIN NRF_GPIO_PIN_MAP(1, 11)
// Deep sleep.
#define PRST_DEEP_SLEEP_IN_SECONDS 2
// BLE.
#define PRST_BLE_ADV_NAME "Prst"
// PWM.
#define PRST_PWM_PIN NRF_GPIO_PIN_MAP(0, 29)
#endif // _PRST_CONFIG_H_