Skip to content

Commit

Permalink
Merge pull request #34 from antoinevg/antoinevg/lpc43xx-gpio-drive-st…
Browse files Browse the repository at this point in the history
…rength

Add drive strength register to LPC43XX SCU GPIO pin configuration
  • Loading branch information
antoinevg authored Oct 18, 2023
2 parents 19c1093 + fb5011a commit 7871b38
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion firmware/platform/lpc43xx/include/drivers/scu.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ typedef enum {
} scu_resistor_configuration_t;


/**
* Enumeration specifying the drive strength to be configured for a given pin.
*/
typedef enum {
SCU_NORMAL = 0b00,
SCU_MEDIUM = 0b01,
SCU_HIGH = 0b10,
SCU_ULTRA = 0b11,

// Platform agnostic names.
DRIVE_CONFIG_NORMAL = 0b00,
DRIVE_CONFIG_MEDIUM = 0b01,
DRIVE_CONFIG_HIGH = 0b10,
DRIVE_CONFIG_ULTRA = 0b11,
} scu_drive_configuration_t;


/**
* Type that represents an SCU register for a given pin.
*/
Expand All @@ -44,7 +61,8 @@ typedef struct ATTR_PACKED {
uint32_t use_fast_slew : 1;
uint32_t input_buffer_enabled : 1;
uint32_t disable_glitch_filter : 1;
uint32_t : 24;
uint32_t drive_strength : 2;
uint32_t : 22;
} platform_scu_pin_configuration_t;
typedef volatile platform_scu_pin_configuration_t platform_scu_pin_register_t;

Expand Down

0 comments on commit 7871b38

Please sign in to comment.