diff --git a/src/leds.c b/src/leds.c index b53e8de7..2f006c96 100644 --- a/src/leds.c +++ b/src/leds.c @@ -59,7 +59,7 @@ #define CHECK 15 // Check LED needs changing // Keep track of LED status and set LED 0 .. LED_N-1 physically on or off -static void led_direct(const PROGRAMMER *pgm, leds_t *ls, int led, int what) { +static void led_direct(const PROGRAMMER *pgm, Leds *ls, int led, int what) { if(what ^ !!(ls->phy & (1<= LED_N) // Sanity return; @@ -125,7 +125,7 @@ static void led_physical(const PROGRAMMER *pgm, leds_t *ls, int led, int what) { // Logical level of setting LEDs, passes on to physical level int led_set(const PROGRAMMER *pgm, int led) { // leds should always be allocated, but if not use dummy - leds_t sanity = { 0, 0, 0, 0, 0, {0, } }, *ls = pgm->leds? pgm->leds: &sanity; + Leds sanity = { 0, 0, 0, 0, 0, {0, } }, *ls = pgm->leds? pgm->leds: &sanity; int what = led >= 0 && led < LED_N && !(ls->now & (1<leds should always be allocated, but if not use dummy - leds_t sanity = { 0, 0, 0, 0, 0, {0, } }, *ls = pgm->leds? pgm->leds: &sanity; + Leds sanity = { 0, 0, 0, 0, 0, {0, } }, *ls = pgm->leds? pgm->leds: &sanity; int what = ls->now & (1<pin[i])); } - pgm->leds = mmt_malloc(sizeof(leds_t)); + pgm->leds = mmt_malloc(sizeof(Leds)); pgm_init_functions(pgm); @@ -218,7 +218,7 @@ PROGRAMMER *pgm_dup(const PROGRAMMER *src) { if(pgm->cp_usersig) mmt_free(pgm->cp_usersig); - leds_t *ls = pgm->leds; + Leds *ls = pgm->leds; memcpy(pgm, src, sizeof(*pgm)); if(ls && src->leds) memcpy(ls, src->leds, sizeof *ls);