mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-06 14:37:27 -06:00
⚡️ GD32: Fast GPIO optimization (#27845)
This commit is contained in:
parent
72f3a4ac31
commit
fd117480d2
1 changed files with 3 additions and 3 deletions
|
@ -29,17 +29,17 @@
|
|||
#include <PinOpsMap.hpp>
|
||||
|
||||
template<typename T>
|
||||
static inline void fast_write_pin_wrapper(pin_size_t IO, T V) {
|
||||
FORCE_INLINE static void fast_write_pin_wrapper(pin_size_t IO, T V) {
|
||||
const PortPinPair& pp = port_pin_map[IO];
|
||||
gpio::fast_write_pin(pp.port, pp.pin, static_cast<bool>(V));
|
||||
}
|
||||
|
||||
static inline auto fast_read_pin_wrapper(pin_size_t IO) -> bool {
|
||||
FORCE_INLINE static auto fast_read_pin_wrapper(pin_size_t IO) -> bool {
|
||||
const PortPinPair& pp = port_pin_map[IO];
|
||||
return gpio::fast_read_pin(pp.port, pp.pin);
|
||||
}
|
||||
|
||||
static inline void fast_toggle_pin_wrapper(pin_size_t IO) {
|
||||
FORCE_INLINE static void fast_toggle_pin_wrapper(pin_size_t IO) {
|
||||
const PortPinPair& pp = port_pin_map[IO];
|
||||
gpio::fast_toggle_pin(pp.port, pp.pin);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue