HAL
HAL layer above libopencm3 library.
 All Files Functions Macros Groups Pages
pin_v0.h File Reference

Go to the source code of this file.

Functions

INLINE uint32_t _pin_port (const uint32_t pin)
 
INLINE uint32_t _pin_pin (const uint32_t pin)
 
INLINE uint32_t _pin_pinno (const uint32_t pin)
 
INLINE void _pin_setmode (uint32_t pin, const uint32_t mode)
 
INLINE void _pin_setspd (uint32_t pin, const uint32_t mode)
 
INLINE bool pin_get (const uint32_t pin)
 Get the actual pin state. More...
 
INLINE void pin_set (const uint32_t pin, bool val)
 Set the pin state. More...
 
INLINE void pin_toggle (const uint32_t pin)
 Toggle the pin level state. More...
 
INLINE void pin_pull_disable (const uint32_t pin)
 Disable pullups or pulldowns on specified pin. More...
 
INLINE void pin_pull_down (const uint32_t pin)
 Set PullDown on the pin. More...
 
INLINE void pin_pull_up (const uint32_t pin)
 Set PullUp on the pin. More...
 
INLINE void pin_output_pushpull (const uint32_t pin, const bool initial_state)
 
INLINE void pin_output_opendrain (const uint32_t pin)
 Set pin to GPIO Output mode, sink only. More...
 
INLINE void pin_af_pushpull (const uint32_t pin)
 Set pin to AuxFn Output mode, source and sink. More...
 
INLINE void pin_af_opendrain (const uint32_t pin)
 Set pin to AuxFn Output mode, sink only. More...
 
INLINE void pin_input (const uint32_t pin)
 Set pin to Input mode. More...
 
INLINE void pin_analog (const uint32_t pin)
 Set pin to Analog mode. More...
 
INLINE void pin_speed_low (const uint32_t pin)
 Set pin speed to slowest mode. More...
 
INLINE void pin_speed_medium (const uint32_t pin)
 Set pin speed to medium speed mode. More...
 
INLINE void pin_speed_fast (const uint32_t pin)
 Set pin speed to fast mode. More...
 
INLINE void pin_speed_high (const uint32_t pin)
 Set pin speed to highest mode. More...
 
INLINE void pin_af_map (const uint32_t pin, const uint32_t af)
 Map the alternate function to the pin. More...
 

Function Documentation

INLINE uint32_t _pin_pin ( const uint32_t  pin)
INLINE void _pin_setmode ( uint32_t  pin,
const uint32_t  mode 
)
INLINE void _pin_setspd ( uint32_t  pin,
const uint32_t  mode 
)

Definition at line 59 of file pin_v0.h.

References _pin_pinno(), and _pin_port().

Referenced by pin_speed_fast(), pin_speed_high(), pin_speed_low(), and pin_speed_medium().

INLINE void pin_output_pushpull ( const uint32_t  pin,
const bool  initial_state 
)

Definition at line 113 of file pin_v0.h.

References _pin_setmode().