strncpy is not safe + memory optimization

This commit is contained in:
Philippe G
2021-11-03 22:00:07 -07:00
parent 2146014f04
commit 974ff5fa68
6 changed files with 12 additions and 8 deletions

View File

@@ -28,7 +28,7 @@
static const char *TAG = "led";
static struct led_s {
static EXT_RAM_ATTR struct led_s {
gpio_num_t gpio;
bool on;
int onstate;
@@ -40,7 +40,7 @@ static struct led_s {
TimerHandle_t timer;
} leds[MAX_LED];
static struct {
static EXT_RAM_ATTR struct {
int gpio;
int active;
int pwm;