libflashrom
libflashrom Documentation

Have a look at the Modules section for a function reference.