mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-04 22:17:31 +00:00
embedded code copied from jankae/VNA and adjusted for STM32G4
This commit is contained in:
parent
7af204b349
commit
30d4ebe37b
215 changed files with 186208 additions and 0 deletions
27
Software/VNA_embedded/Application/Drivers/Exti.hpp
Normal file
27
Software/VNA_embedded/Application/Drivers/Exti.hpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "stm.hpp"
|
||||
|
||||
namespace Exti {
|
||||
|
||||
enum class EdgeType : uint8_t {
|
||||
Falling,
|
||||
Rising,
|
||||
Both,
|
||||
};
|
||||
|
||||
enum class Pull : uint8_t {
|
||||
None,
|
||||
Up,
|
||||
Down,
|
||||
};
|
||||
|
||||
using Callback = void(*)(void*);
|
||||
|
||||
void Init();
|
||||
bool SetCallback(GPIO_TypeDef *gpio, uint16_t pin, EdgeType edge, Pull pull, Callback cb, void *ptr = nullptr);
|
||||
bool ClearCallback(GPIO_TypeDef *gpio, uint16_t pin);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue