Simple control for ST M5451 LED driver.
Sample
Sample code which toggles outputs one by one.
main.cpp
#include "mbed.h" #include "M5451.h" M5451 m5451(D8, D7); // data, clock 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(); } }