|
|
|
|
@ -15,18 +15,9 @@
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifdef __AVR__
|
|
|
|
|
# include <avr/interrupt.h>
|
|
|
|
|
# include <avr/io.h>
|
|
|
|
|
# include <util/delay.h>
|
|
|
|
|
#else
|
|
|
|
|
# include "wait.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include "is31fl3731.h"
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include "i2c_master.h"
|
|
|
|
|
#include "progmem.h"
|
|
|
|
|
#include "wait.h"
|
|
|
|
|
|
|
|
|
|
// This is a 7-bit address, that gets left-shifted and bit 0
|
|
|
|
|
// set to 0 for write, 1 for read (as per I2C protocol)
|
|
|
|
|
@ -141,12 +132,9 @@ void IS31FL3731_init(uint8_t addr) {
|
|
|
|
|
|
|
|
|
|
// enable software shutdown
|
|
|
|
|
IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
|
|
|
|
|
|
|
|
|
|
// this delay was copied from other drivers, might not be needed
|
|
|
|
|
#ifdef __AVR__
|
|
|
|
|
_delay_ms(10);
|
|
|
|
|
#else
|
|
|
|
|
wait_ms(10);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
// picture mode
|
|
|
|
|
IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
|
|
|
|
|
|