Update GPIO macro usages in core (#23093)
This commit is contained in:
		
							parent
							
								
									6810aaf013
								
							
						
					
					
						commit
						2d1aed78a6
					
				
					 61 changed files with 334 additions and 334 deletions
				
			
		|  | @ -192,7 +192,7 @@ __attribute__((weak)) bool oled_send_cmd(const uint8_t *data, uint16_t size) { | |||
|         return false; | ||||
|     } | ||||
|     // Command Mode
 | ||||
|     writePinLow(OLED_DC_PIN); | ||||
|     gpio_write_pin_low(OLED_DC_PIN); | ||||
|     // Send the commands
 | ||||
|     if (spi_transmit(&data[1], size - 1) != SPI_STATUS_SUCCESS) { | ||||
|         spi_stop(); | ||||
|  | @ -215,7 +215,7 @@ __attribute__((weak)) bool oled_send_cmd_P(const uint8_t *data, uint16_t size) { | |||
|     } | ||||
|     spi_status_t status = SPI_STATUS_SUCCESS; | ||||
|     // Command Mode
 | ||||
|     writePinLow(OLED_DC_PIN); | ||||
|     gpio_write_pin_low(OLED_DC_PIN); | ||||
|     // Send the commands
 | ||||
|     for (uint16_t i = 1; i < size && status >= 0; i++) { | ||||
|         status = spi_write(pgm_read_byte((const char *)&data[i])); | ||||
|  | @ -239,7 +239,7 @@ __attribute__((weak)) bool oled_send_data(const uint8_t *data, uint16_t size) { | |||
|         return false; | ||||
|     } | ||||
|     // Data Mode
 | ||||
|     writePinHigh(OLED_DC_PIN); | ||||
|     gpio_write_pin_high(OLED_DC_PIN); | ||||
|     // Send the commands
 | ||||
|     if (spi_transmit(data, size) != SPI_STATUS_SUCCESS) { | ||||
|         spi_stop(); | ||||
|  | @ -256,17 +256,17 @@ __attribute__((weak)) bool oled_send_data(const uint8_t *data, uint16_t size) { | |||
| __attribute__((weak)) void oled_driver_init(void) { | ||||
| #if defined(OLED_TRANSPORT_SPI) | ||||
|     spi_init(); | ||||
|     setPinOutput(OLED_CS_PIN); | ||||
|     writePinHigh(OLED_CS_PIN); | ||||
|     gpio_set_pin_output(OLED_CS_PIN); | ||||
|     gpio_write_pin_high(OLED_CS_PIN); | ||||
| 
 | ||||
|     setPinOutput(OLED_DC_PIN); | ||||
|     writePinLow(OLED_DC_PIN); | ||||
|     gpio_set_pin_output(OLED_DC_PIN); | ||||
|     gpio_write_pin_low(OLED_DC_PIN); | ||||
| #    ifdef OLED_RST_PIN | ||||
|     /* Reset device */ | ||||
|     setPinOutput(OLED_RST_PIN); | ||||
|     writePinLow(OLED_RST_PIN); | ||||
|     gpio_set_pin_output(OLED_RST_PIN); | ||||
|     gpio_write_pin_low(OLED_RST_PIN); | ||||
|     wait_ms(20); | ||||
|     writePinHigh(OLED_RST_PIN); | ||||
|     gpio_write_pin_high(OLED_RST_PIN); | ||||
|     wait_ms(20); | ||||
| #    endif | ||||
| #elif defined(OLED_TRANSPORT_I2C) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Ryan
						Ryan