mirror of
https://github.com/qmk/qmk_firmware
synced 2024-12-22 08:26:21 +00:00
Update GPIO macro usages in core (#23093)
This commit is contained in:
parent
6810aaf013
commit
2d1aed78a6
@ -188,7 +188,7 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) {
|
||||
bool ready = false;
|
||||
|
||||
do {
|
||||
ready = readPin(BLUEFRUIT_LE_IRQ_PIN);
|
||||
ready = gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN);
|
||||
if (ready) {
|
||||
break;
|
||||
}
|
||||
@ -231,7 +231,7 @@ static void resp_buf_read_one(bool greedy) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (readPin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
if (gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
struct sdep_msg msg;
|
||||
|
||||
again:
|
||||
@ -242,7 +242,7 @@ static void resp_buf_read_one(bool greedy) {
|
||||
dprintf("recv latency %dms\n", TIMER_DIFF_16(timer_read(), last_send));
|
||||
}
|
||||
|
||||
if (greedy && resp_buf.peek(last_send) && readPin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
if (greedy && resp_buf.peek(last_send) && gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
@ -293,16 +293,16 @@ void bluefruit_le_init(void) {
|
||||
state.configured = false;
|
||||
state.is_connected = false;
|
||||
|
||||
setPinInput(BLUEFRUIT_LE_IRQ_PIN);
|
||||
gpio_set_pin_input(BLUEFRUIT_LE_IRQ_PIN);
|
||||
|
||||
spi_init();
|
||||
|
||||
// Perform a hardware reset
|
||||
setPinOutput(BLUEFRUIT_LE_RST_PIN);
|
||||
writePinHigh(BLUEFRUIT_LE_RST_PIN);
|
||||
writePinLow(BLUEFRUIT_LE_RST_PIN);
|
||||
gpio_set_pin_output(BLUEFRUIT_LE_RST_PIN);
|
||||
gpio_write_pin_high(BLUEFRUIT_LE_RST_PIN);
|
||||
gpio_write_pin_low(BLUEFRUIT_LE_RST_PIN);
|
||||
wait_ms(10);
|
||||
writePinHigh(BLUEFRUIT_LE_RST_PIN);
|
||||
gpio_write_pin_high(BLUEFRUIT_LE_RST_PIN);
|
||||
|
||||
wait_ms(1000); // Give it a second to initialize
|
||||
|
||||
@ -508,7 +508,7 @@ void bluefruit_le_task(void) {
|
||||
resp_buf_read_one(true);
|
||||
send_buf_send_one(SdepShortTimeout);
|
||||
|
||||
if (resp_buf.empty() && (state.event_flags & UsingEvents) && readPin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
if (resp_buf.empty() && (state.event_flags & UsingEvents) && gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
// Must be an event update
|
||||
if (at_command_P(PSTR("AT+EVENTSTATUS"), resbuf, sizeof(resbuf))) {
|
||||
uint32_t mask = strtoul(resbuf, NULL, 16);
|
||||
|
@ -57,8 +57,8 @@ void eeprom_driver_init(void) {
|
||||
i2c_init();
|
||||
#if defined(EXTERNAL_EEPROM_WP_PIN)
|
||||
/* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */
|
||||
writePin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
setPinInputHigh(EXTERNAL_EEPROM_WP_PIN);
|
||||
gpio_write_pin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
gpio_set_pin_input_high(EXTERNAL_EEPROM_WP_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -100,8 +100,8 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
uintptr_t target_addr = (uintptr_t)addr;
|
||||
|
||||
#if defined(EXTERNAL_EEPROM_WP_PIN)
|
||||
setPinOutput(EXTERNAL_EEPROM_WP_PIN);
|
||||
writePin(EXTERNAL_EEPROM_WP_PIN, 0);
|
||||
gpio_set_pin_output(EXTERNAL_EEPROM_WP_PIN);
|
||||
gpio_write_pin(EXTERNAL_EEPROM_WP_PIN, 0);
|
||||
#endif
|
||||
|
||||
while (len > 0) {
|
||||
@ -134,7 +134,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
|
||||
#if defined(EXTERNAL_EEPROM_WP_PIN)
|
||||
/* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */
|
||||
writePin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
setPinInputHigh(EXTERNAL_EEPROM_WP_PIN);
|
||||
gpio_write_pin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
gpio_set_pin_input_high(EXTERNAL_EEPROM_WP_PIN);
|
||||
#endif
|
||||
}
|
||||
|
@ -27,39 +27,39 @@ static const pin_t address_pins[ADDRESS_PIN_COUNT] = SN74X138_ADDRESS_PINS;
|
||||
|
||||
void sn74x138_init(void) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
setPinOutput(address_pins[i]);
|
||||
writePinLow(address_pins[i]);
|
||||
gpio_set_pin_output(address_pins[i]);
|
||||
gpio_write_pin_low(address_pins[i]);
|
||||
}
|
||||
|
||||
#if defined(SN74X138_E1_PIN)
|
||||
setPinOutput(SN74X138_E1_PIN);
|
||||
writePinHigh(SN74X138_E1_PIN);
|
||||
gpio_set_pin_output(SN74X138_E1_PIN);
|
||||
gpio_write_pin_high(SN74X138_E1_PIN);
|
||||
#endif
|
||||
|
||||
#if defined(SN74X138_E2_PIN)
|
||||
setPinOutput(SN74X138_E2_PIN);
|
||||
writePinHigh(SN74X138_E2_PIN);
|
||||
gpio_set_pin_output(SN74X138_E2_PIN);
|
||||
gpio_write_pin_high(SN74X138_E2_PIN);
|
||||
#endif
|
||||
#if defined(SN74X138_E3_PIN)
|
||||
setPinOutput(SN74X138_E3_PIN);
|
||||
writePinLow(SN74X138_E3_PIN);
|
||||
gpio_set_pin_output(SN74X138_E3_PIN);
|
||||
gpio_write_pin_low(SN74X138_E3_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x138_set_enabled(bool enabled) {
|
||||
#if defined(SN74X138_E1_PIN)
|
||||
writePin(SN74X138_E1_PIN, !enabled);
|
||||
gpio_write_pin(SN74X138_E1_PIN, !enabled);
|
||||
#endif
|
||||
#if defined(SN74X138_E2_PIN)
|
||||
writePin(SN74X138_E2_PIN, !enabled);
|
||||
gpio_write_pin(SN74X138_E2_PIN, !enabled);
|
||||
#endif
|
||||
#if defined(SN74X138_E3_PIN)
|
||||
writePin(SN74X138_E3_PIN, enabled);
|
||||
gpio_write_pin(SN74X138_E3_PIN, enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x138_set_addr(uint8_t address) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
writePin(address_pins[i], address & (1 << i));
|
||||
gpio_write_pin(address_pins[i], address & (1 << i));
|
||||
}
|
||||
}
|
||||
|
@ -27,32 +27,32 @@ static const pin_t address_pins[ADDRESS_PIN_COUNT] = SN74X154_ADDRESS_PINS;
|
||||
|
||||
void sn74x154_init(void) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
setPinOutput(address_pins[i]);
|
||||
writePinLow(address_pins[i]);
|
||||
gpio_set_pin_output(address_pins[i]);
|
||||
gpio_write_pin_low(address_pins[i]);
|
||||
}
|
||||
|
||||
#if defined(SN74X154_E0_PIN)
|
||||
setPinOutput(SN74X154_E0_PIN);
|
||||
writePinHigh(SN74X154_E0_PIN);
|
||||
gpio_set_pin_output(SN74X154_E0_PIN);
|
||||
gpio_write_pin_high(SN74X154_E0_PIN);
|
||||
#endif
|
||||
|
||||
#if defined(SN74X154_E1_PIN)
|
||||
setPinOutput(SN74X154_E1_PIN);
|
||||
writePinHigh(SN74X154_E1_PIN);
|
||||
gpio_set_pin_output(SN74X154_E1_PIN);
|
||||
gpio_write_pin_high(SN74X154_E1_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x154_set_enabled(bool enabled) {
|
||||
#if defined(SN74X154_E0_PIN)
|
||||
writePin(SN74X154_E0_PIN, !enabled);
|
||||
gpio_write_pin(SN74X154_E0_PIN, !enabled);
|
||||
#endif
|
||||
#if defined(SN74X154_E1_PIN)
|
||||
writePin(SN74X154_E1_PIN, !enabled);
|
||||
gpio_write_pin(SN74X154_E1_PIN, !enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x154_set_addr(uint8_t address) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
writePin(address_pins[i], address & (1 << i));
|
||||
gpio_write_pin(address_pins[i], address & (1 << i));
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ void solenoid_set_dwell(uint8_t dwell) {
|
||||
* @param index select which solenoid to check/stop
|
||||
*/
|
||||
void solenoid_stop(uint8_t index) {
|
||||
writePin(solenoid_pads[index], !solenoid_active_state[index]);
|
||||
gpio_write_pin(solenoid_pads[index], !solenoid_active_state[index]);
|
||||
solenoid_on[index] = false;
|
||||
solenoid_buzzing[index] = false;
|
||||
}
|
||||
@ -78,7 +78,7 @@ void solenoid_fire(uint8_t index) {
|
||||
solenoid_on[index] = true;
|
||||
solenoid_buzzing[index] = true;
|
||||
solenoid_start[index] = timer_read();
|
||||
writePin(solenoid_pads[index], solenoid_active_state[index]);
|
||||
gpio_write_pin(solenoid_pads[index], solenoid_active_state[index]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,12 +128,12 @@ void solenoid_check(void) {
|
||||
if ((elapsed[i] % (SOLENOID_BUZZ_ACTUATED + SOLENOID_BUZZ_NONACTUATED)) < SOLENOID_BUZZ_ACTUATED) {
|
||||
if (!solenoid_buzzing[i]) {
|
||||
solenoid_buzzing[i] = true;
|
||||
writePin(solenoid_pads[i], solenoid_active_state[i]);
|
||||
gpio_write_pin(solenoid_pads[i], solenoid_active_state[i]);
|
||||
}
|
||||
} else {
|
||||
if (solenoid_buzzing[i]) {
|
||||
solenoid_buzzing[i] = false;
|
||||
writePin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -156,8 +156,8 @@ void solenoid_setup(void) {
|
||||
#else
|
||||
solenoid_active_state[i] = high;
|
||||
#endif
|
||||
writePin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
setPinOutput(solenoid_pads[i]);
|
||||
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
gpio_set_pin_output(solenoid_pads[i]);
|
||||
if ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state == USB_DEVICE_STATE_CONFIGURED)) {
|
||||
solenoid_fire(i);
|
||||
}
|
||||
@ -170,6 +170,6 @@ void solenoid_setup(void) {
|
||||
*/
|
||||
void solenoid_shutdown(void) {
|
||||
for (uint8_t i = 0; i < NUMBER_OF_SOLENOIDS; i++) {
|
||||
writePin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
}
|
||||
}
|
||||
|
@ -57,67 +57,67 @@ static const pin_t data_pins[4] = HD44780_DATA_PINS;
|
||||
#define HD44780_ENABLE_DELAY_US 1
|
||||
|
||||
static void hd44780_latch(void) {
|
||||
writePinHigh(HD44780_E_PIN);
|
||||
gpio_write_pin_high(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
writePinLow(HD44780_E_PIN);
|
||||
gpio_write_pin_low(HD44780_E_PIN);
|
||||
}
|
||||
|
||||
void hd44780_write(uint8_t data, bool isData) {
|
||||
writePin(HD44780_RS_PIN, isData);
|
||||
writePinLow(HD44780_RW_PIN);
|
||||
gpio_write_pin(HD44780_RS_PIN, isData);
|
||||
gpio_write_pin_low(HD44780_RW_PIN);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
setPinOutput(data_pins[i]);
|
||||
gpio_set_pin_output(data_pins[i]);
|
||||
}
|
||||
|
||||
// Write high nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
writePin(data_pins[i], (data >> 4) & (1 << i));
|
||||
gpio_write_pin(data_pins[i], (data >> 4) & (1 << i));
|
||||
}
|
||||
hd44780_latch();
|
||||
|
||||
// Write low nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
writePin(data_pins[i], data & (1 << i));
|
||||
gpio_write_pin(data_pins[i], data & (1 << i));
|
||||
}
|
||||
hd44780_latch();
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
writePinHigh(data_pins[i]);
|
||||
gpio_write_pin_high(data_pins[i]);
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t hd44780_read(bool isData) {
|
||||
uint8_t data = 0;
|
||||
|
||||
writePin(HD44780_RS_PIN, isData);
|
||||
writePinHigh(HD44780_RW_PIN);
|
||||
gpio_write_pin(HD44780_RS_PIN, isData);
|
||||
gpio_write_pin_high(HD44780_RW_PIN);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
setPinInput(data_pins[i]);
|
||||
gpio_set_pin_input(data_pins[i]);
|
||||
}
|
||||
|
||||
writePinHigh(HD44780_E_PIN);
|
||||
gpio_write_pin_high(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
|
||||
// Read high nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
data |= (readPin(data_pins[i]) << i);
|
||||
data |= (gpio_read_pin(data_pins[i]) << i);
|
||||
}
|
||||
|
||||
data <<= 4;
|
||||
|
||||
writePinLow(HD44780_E_PIN);
|
||||
gpio_write_pin_low(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
writePinHigh(HD44780_E_PIN);
|
||||
gpio_write_pin_high(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
|
||||
// Read low nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
data |= (readPin(data_pins[i]) << i);
|
||||
data |= (gpio_read_pin(data_pins[i]) << i);
|
||||
}
|
||||
|
||||
writePinLow(HD44780_E_PIN);
|
||||
gpio_write_pin_low(HD44780_E_PIN);
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -171,20 +171,20 @@ void hd44780_set_ddram_address(uint8_t address) {
|
||||
}
|
||||
|
||||
void hd44780_init(bool cursor, bool blink) {
|
||||
setPinOutput(HD44780_RS_PIN);
|
||||
setPinOutput(HD44780_RW_PIN);
|
||||
setPinOutput(HD44780_E_PIN);
|
||||
gpio_set_pin_output(HD44780_RS_PIN);
|
||||
gpio_set_pin_output(HD44780_RW_PIN);
|
||||
gpio_set_pin_output(HD44780_E_PIN);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
setPinOutput(data_pins[i]);
|
||||
gpio_set_pin_output(data_pins[i]);
|
||||
}
|
||||
|
||||
wait_ms(HD44780_INIT_DELAY_MS);
|
||||
|
||||
// Manually configure for 4-bit mode - can't use hd44780_command() yet
|
||||
// HD44780U datasheet, Fig. 24 (p46)
|
||||
writePinHigh(data_pins[0]); // Function set
|
||||
writePinHigh(data_pins[1]); // DL = 1
|
||||
gpio_write_pin_high(data_pins[0]); // Function set
|
||||
gpio_write_pin_high(data_pins[1]); // DL = 1
|
||||
hd44780_latch();
|
||||
wait_ms(5);
|
||||
// Send again
|
||||
@ -194,7 +194,7 @@ void hd44780_init(bool cursor, bool blink) {
|
||||
hd44780_latch();
|
||||
wait_us(64);
|
||||
|
||||
writePinLow(data_pins[0]); // DL = 0
|
||||
gpio_write_pin_low(data_pins[0]); // DL = 0
|
||||
hd44780_latch();
|
||||
wait_us(64);
|
||||
|
||||
|
@ -92,10 +92,10 @@ static void InvertCharacter(uint8_t *cursor) {
|
||||
}
|
||||
|
||||
bool st7565_init(display_rotation_t rotation) {
|
||||
setPinOutput(ST7565_A0_PIN);
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
setPinOutput(ST7565_RST_PIN);
|
||||
writePinHigh(ST7565_RST_PIN);
|
||||
gpio_set_pin_output(ST7565_A0_PIN);
|
||||
gpio_write_pin_high(ST7565_A0_PIN);
|
||||
gpio_set_pin_output(ST7565_RST_PIN);
|
||||
gpio_write_pin_high(ST7565_RST_PIN);
|
||||
|
||||
st7565_rotation = st7565_init_user(rotation);
|
||||
|
||||
@ -488,18 +488,18 @@ void st7565_task(void) {
|
||||
__attribute__((weak)) void st7565_task_user(void) {}
|
||||
|
||||
void st7565_reset(void) {
|
||||
writePinLow(ST7565_RST_PIN);
|
||||
gpio_write_pin_low(ST7565_RST_PIN);
|
||||
wait_ms(20);
|
||||
writePinHigh(ST7565_RST_PIN);
|
||||
gpio_write_pin_high(ST7565_RST_PIN);
|
||||
wait_ms(20);
|
||||
}
|
||||
|
||||
spi_status_t st7565_send_cmd(uint8_t cmd) {
|
||||
writePinLow(ST7565_A0_PIN);
|
||||
gpio_write_pin_low(ST7565_A0_PIN);
|
||||
return spi_write(cmd);
|
||||
}
|
||||
|
||||
spi_status_t st7565_send_data(uint8_t *data, uint16_t length) {
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
gpio_write_pin_high(ST7565_A0_PIN);
|
||||
return spi_transmit(data, length);
|
||||
}
|
||||
|
@ -43,14 +43,14 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define APA102_SEND_BIT(byte, bit) \
|
||||
do { \
|
||||
writePin(APA102_DI_PIN, (byte >> bit) & 1); \
|
||||
io_wait; \
|
||||
writePinHigh(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
writePinLow(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
#define APA102_SEND_BIT(byte, bit) \
|
||||
do { \
|
||||
gpio_write_pin(APA102_DI_PIN, (byte >> bit) & 1); \
|
||||
io_wait; \
|
||||
gpio_write_pin_high(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
gpio_write_pin_low(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
} while (0)
|
||||
|
||||
uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
|
||||
@ -114,11 +114,11 @@ static void apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t
|
||||
}
|
||||
|
||||
void apa102_init(void) {
|
||||
setPinOutput(APA102_DI_PIN);
|
||||
setPinOutput(APA102_CI_PIN);
|
||||
gpio_set_pin_output(APA102_DI_PIN);
|
||||
gpio_set_pin_output(APA102_CI_PIN);
|
||||
|
||||
writePinLow(APA102_DI_PIN);
|
||||
writePinLow(APA102_CI_PIN);
|
||||
gpio_write_pin_low(APA102_DI_PIN);
|
||||
gpio_write_pin_low(APA102_CI_PIN);
|
||||
}
|
||||
|
||||
void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) {
|
||||
|
@ -114,8 +114,8 @@ void aw20216s_init_drivers(void) {
|
||||
spi_init();
|
||||
|
||||
#if defined(AW20216S_EN_PIN)
|
||||
setPinOutput(AW20216S_EN_PIN);
|
||||
writePinHigh(AW20216S_EN_PIN);
|
||||
gpio_set_pin_output(AW20216S_EN_PIN);
|
||||
gpio_write_pin_high(AW20216S_EN_PIN);
|
||||
#endif
|
||||
|
||||
aw20216s_init(AW20216S_CS_PIN_1);
|
||||
|
@ -68,8 +68,8 @@ void is31fl3218_init(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3218_SDB_PIN)
|
||||
setPinOutput(IS31FL3218_SDB_PIN);
|
||||
writePinHigh(IS31FL3218_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3218_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3218_SDB_PIN);
|
||||
#endif
|
||||
|
||||
// In case we ever want to reinitialize (?)
|
||||
|
@ -68,8 +68,8 @@ void is31fl3218_init(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3218_SDB_PIN)
|
||||
setPinOutput(IS31FL3218_SDB_PIN);
|
||||
writePinHigh(IS31FL3218_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3218_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3218_SDB_PIN);
|
||||
#endif
|
||||
|
||||
// In case we ever want to reinitialize (?)
|
||||
|
@ -99,8 +99,8 @@ void is31fl3731_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3731_SDB_PIN)
|
||||
setPinOutput(IS31FL3731_SDB_PIN);
|
||||
writePinHigh(IS31FL3731_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3731_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3731_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
|
@ -98,8 +98,8 @@ void is31fl3731_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3731_SDB_PIN)
|
||||
setPinOutput(IS31FL3731_SDB_PIN);
|
||||
writePinHigh(IS31FL3731_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3731_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3731_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
|
@ -144,8 +144,8 @@ void is31fl3733_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3733_SDB_PIN)
|
||||
setPinOutput(IS31FL3733_SDB_PIN);
|
||||
writePinHigh(IS31FL3733_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3733_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3733_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
|
@ -143,8 +143,8 @@ void is31fl3733_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3733_SDB_PIN)
|
||||
setPinOutput(IS31FL3733_SDB_PIN);
|
||||
writePinHigh(IS31FL3733_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3733_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3733_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
|
@ -115,8 +115,8 @@ void is31fl3736_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3736_SDB_PIN)
|
||||
setPinOutput(IS31FL3736_SDB_PIN);
|
||||
writePinHigh(IS31FL3736_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3736_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3736_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) {
|
||||
|
@ -115,8 +115,8 @@ void is31fl3736_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3736_SDB_PIN)
|
||||
setPinOutput(IS31FL3736_SDB_PIN);
|
||||
writePinHigh(IS31FL3736_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3736_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3736_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3736_DRIVER_COUNT; i++) {
|
||||
|
@ -117,8 +117,8 @@ void is31fl3737_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3737_SDB_PIN)
|
||||
setPinOutput(IS31FL3737_SDB_PIN);
|
||||
writePinHigh(IS31FL3737_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3737_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3737_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) {
|
||||
|
@ -117,8 +117,8 @@ void is31fl3737_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3737_SDB_PIN)
|
||||
setPinOutput(IS31FL3737_SDB_PIN);
|
||||
writePinHigh(IS31FL3737_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3737_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3737_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3737_DRIVER_COUNT; i++) {
|
||||
|
@ -143,8 +143,8 @@ void is31fl3741_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3741_SDB_PIN)
|
||||
setPinOutput(IS31FL3741_SDB_PIN);
|
||||
writePinHigh(IS31FL3741_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3741_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3741_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) {
|
||||
|
@ -143,8 +143,8 @@ void is31fl3741_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3741_SDB_PIN)
|
||||
setPinOutput(IS31FL3741_SDB_PIN);
|
||||
writePinHigh(IS31FL3741_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3741_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3741_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3741_DRIVER_COUNT; i++) {
|
||||
|
@ -116,8 +116,8 @@ void is31fl3742a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3742A_SDB_PIN)
|
||||
setPinOutput(IS31FL3742A_SDB_PIN);
|
||||
writePinHigh(IS31FL3742A_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3742A_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3742A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) {
|
||||
|
@ -116,8 +116,8 @@ void is31fl3742a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3742A_SDB_PIN)
|
||||
setPinOutput(IS31FL3742A_SDB_PIN);
|
||||
writePinHigh(IS31FL3742A_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3742A_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3742A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3742A_DRIVER_COUNT; i++) {
|
||||
|
@ -138,8 +138,8 @@ void is31fl3743a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3743A_SDB_PIN)
|
||||
setPinOutput(IS31FL3743A_SDB_PIN);
|
||||
writePinHigh(IS31FL3743A_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3743A_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3743A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) {
|
||||
|
@ -138,8 +138,8 @@ void is31fl3743a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3743A_SDB_PIN)
|
||||
setPinOutput(IS31FL3743A_SDB_PIN);
|
||||
writePinHigh(IS31FL3743A_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3743A_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3743A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3743A_DRIVER_COUNT; i++) {
|
||||
|
@ -138,8 +138,8 @@ void is31fl3745_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3745_SDB_PIN)
|
||||
setPinOutput(IS31FL3745_SDB_PIN);
|
||||
writePinHigh(IS31FL3745_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3745_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3745_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) {
|
||||
|
@ -138,8 +138,8 @@ void is31fl3745_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3745_SDB_PIN)
|
||||
setPinOutput(IS31FL3745_SDB_PIN);
|
||||
writePinHigh(IS31FL3745_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3745_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3745_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3745_DRIVER_COUNT; i++) {
|
||||
|
@ -116,8 +116,8 @@ void is31fl3746a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3746A_SDB_PIN)
|
||||
setPinOutput(IS31FL3746A_SDB_PIN);
|
||||
writePinHigh(IS31FL3746A_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3746A_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3746A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) {
|
||||
|
@ -116,8 +116,8 @@ void is31fl3746a_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3746A_SDB_PIN)
|
||||
setPinOutput(IS31FL3746A_SDB_PIN);
|
||||
writePinHigh(IS31FL3746A_SDB_PIN);
|
||||
gpio_set_pin_output(IS31FL3746A_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3746A_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3746A_DRIVER_COUNT; i++) {
|
||||
|
@ -105,8 +105,8 @@ void snled27351_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(SNLED27351_SDB_PIN)
|
||||
setPinOutput(SNLED27351_SDB_PIN);
|
||||
writePinHigh(SNLED27351_SDB_PIN);
|
||||
gpio_set_pin_output(SNLED27351_SDB_PIN);
|
||||
gpio_write_pin_high(SNLED27351_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < SNLED27351_DRIVER_COUNT; i++) {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user