Class hal::lpc40::pin
lpc40xx pin multiplexing and control driver used drivers and apps seeking to tune the pins.
#include <pin.hpp>
Public Functions
Type | Name |
---|---|
const pin & | analog (bool p_enable) const enable analog mode for this pin (required for dac and adc drivers) |
const pin & | dac (bool p_enable=true) const Enable dac mode (required for the dac driver) |
const pin & | digital_filter (bool p_enable) const enable digital filtering (filter out noise on input lines) |
const pin & | function (uint8_t p_function_code) const Change the function of the pin (mux the pins function) |
const pin & | high_slew_rate (bool p_enable=true) const enable high slew rate for pin |
const pin & | highspeed_i2c (bool p_enable=true) const Enable high speed mode for i2c pins. |
const pin & | hysteresis (bool p_enable) const Disable or enable hysteresis mode for this pin. |
const pin & | i2c_high_current (bool p_enable=true) const enable high current drain for i2c lines |
const pin & | input_invert (bool p_enable) const invert the logic for this pin in input mode |
const pin & | open_drain (bool p_enable=true) const Make the pin open drain (required for the i2c driver) |
constexpr | pin (std::uint8_t p_port, std::uint8_t p_pin) Construct a new pin mux and configuration driver. |
constexpr | pin () = default Default constructor. |
const pin & | resistor (hal::pin_resistor p_resistor) const Set the internal resistor connection for this pin. |
Public Functions Documentation
function analog
enable analog mode for this pin (required for dac and adc drivers)
const pin & hal::lpc40::pin::analog (
bool p_enable
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function dac
Enable dac mode (required for the dac driver)
const pin & hal::lpc40::pin::dac (
bool p_enable=true
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function digital_filter
enable digital filtering (filter out noise on input lines)
const pin & hal::lpc40::pin::digital_filter (
bool p_enable
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function function
Change the function of the pin (mux the pins function)
const pin & hal::lpc40::pin::function (
uint8_t p_function_code
) const
Parameters:
p_function_code
- the pin function code
Returns:
pin& - reference to this pin for chaining
function high_slew_rate
enable high slew rate for pin
const pin & hal::lpc40::pin::high_slew_rate (
bool p_enable=true
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function highspeed_i2c
Enable high speed mode for i2c pins.
const pin & hal::lpc40::pin::highspeed_i2c (
bool p_enable=true
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function hysteresis
Disable or enable hysteresis mode for this pin.
const pin & hal::lpc40::pin::hysteresis (
bool p_enable
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function i2c_high_current
enable high current drain for i2c lines
const pin & hal::lpc40::pin::i2c_high_current (
bool p_enable=true
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function input_invert
invert the logic for this pin in input mode
const pin & hal::lpc40::pin::input_invert (
bool p_enable
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function open_drain
Make the pin open drain (required for the i2c driver)
const pin & hal::lpc40::pin::open_drain (
bool p_enable=true
) const
Parameters:
p_enable
- enable this mode, set to false to disable this mode
Returns:
pin& - reference to this pin for chaining
function pin [1/2]
Construct a new pin mux and configuration driver.
inline constexpr hal::lpc40::pin::pin (
std::uint8_t p_port,
std::uint8_t p_pin
)
See UM10562 page 99 for more details on which pins can be what function.
Parameters:
p_port
- selects pin port to usep_pin
- selects pin within the port to use
function pin [2/2]
constexpr hal::lpc40::pin::pin () = default
function resistor
Set the internal resistor connection for this pin.
const pin & hal::lpc40::pin::resistor (
hal::pin_resistor p_resistor
) const
Parameters:
p_resistor
- resistor type
Returns:
pin& - reference to this pin for chaining
The documentation for this class was generated from the following file libraries/include/libhal-lpc40/pin.hpp