Skip to content

Commit

Permalink
firmware: add drive strength register to scu pin configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinevg committed Oct 16, 2023
1 parent 19c1093 commit 2bcb211
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 = 0b10,
SCU_MEDIUM = 0b11,
SCU_HIGH = 0b00,
SCU_ULTRA = 0b01,

// 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 : 1;
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 2bcb211

Please sign in to comment.