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();
    }
}
Download repository: zip gz

Files at revision 1:db1e69c22bc6

Name Size Actions
[up]
M5451.cpp 1319 Revisions Annotate
M5451.h 574 Revisions Annotate