Clean up ISSI driver includes (#7734)
* Clean up ISSI driver includes * Missed an endif
This commit is contained in:
parent
25aaeb4f40
commit
8af1501328
10 changed files with 25 additions and 95 deletions
|
@ -16,18 +16,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 <string.h>
|
||||
#include "i2c_master.h"
|
||||
#include "progmem.h"
|
||||
#include "is31fl3733.h"
|
||||
#include "i2c_master.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)
|
||||
|
@ -168,12 +159,8 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) {
|
|||
// Disable software shutdown.
|
||||
IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01);
|
||||
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
#ifdef __AVR__
|
||||
_delay_ms(10);
|
||||
#else
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
wait_ms(10);
|
||||
#endif
|
||||
}
|
||||
|
||||
void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue