Simple control for ST M5451 LED driver.

Sample usage

#include "mbed.h"
#include "M5451.h"

M5451 m5451(D8, D7);

void toggleOneByOne(){
    for(char i = 0; i < m5451.outputs(); i++){
        m5451.toggleBit(i);
        m5451.update();
        wait_ms(250);
        m5451.toggleBit(i);
    }
}

int main() {
    while(1) {
        m5451.setAllBits(0);
        toggleOneByOne();
        m5451.setAllBits(1);
        toggleOneByOne();
    }
}

History

add toggleBit default tip

2020-03-01, by jirrick [Sun, 01 Mar 2020 11:41:57 +0000] rev 1

add toggleBit


initial version

2020-03-01, by jirrick [Sun, 01 Mar 2020 10:20:26 +0000] rev 0

initial version