Comments (4)
I've already started #27, which takes a bit different, but similar approach. I personally prefer the approach with an universal Unused pin implementing all the AF traits, but both approaches are (mostly) equivalent. It's doesn't seem hard to modify it.
from stm32f0xx-hal.
I personally prefer the approach with an universal Unused pin implementing all the AF traits, but both approaches are (mostly) equivalent.
Uhm, that's not what your implementation does. I basically just defines an empty shell without any functionality (not even sure why you're using a PhantomData).
from stm32f0xx-hal.
With AF traits i meant the traits that implement the link from af to peripheral, eg TxPin.
I used PhantomData because I wasn't sure if we maybe need to extend it in the future and without it it's constructable by user code (afaik).
from stm32f0xx-hal.
I used PhantomData because I wasn't sure if we maybe need to extend it in the future
😲
and without it it's constructable by user code (afaik).
In that case you could use
pub struct Unused {
_0: (),
}
However it doesn't really matter since it's really just an empty shell and there's exactly none functionality attached to it (and true to the meaning never should be...).
from stm32f0xx-hal.
Related Issues (20)
- Why does configuring a GPIO require a critical section in this hal? HOT 2
- Have PA9/10/11/12 USB pins automatically remap? HOT 5
- cannot find value `RCC_PLLSRC_PREDIV1_SUPPORT` HOT 5
- SPI blocking transfers do not wait for completion. HOT 13
- First write on I2C bus never NACK's HOT 15
- bxcan/defmt version conflict HOT 3
- SPI on 0.17.1 is broken HOT 3
- More precise units for timers. HOT 1
- USART: Support half-duplex mode HOT 1
- rcc error HOT 1
- Flash Driver HOT 2
- How to use SysTick timer to count ticks from a rotary encoder? HOT 3
- Improve API to allow having an array of Analog pins HOT 1
- Cannot acknowledge timer interrupt flag
- Confused by features on f03x HOT 1
- Disabling GPIO clock HOT 1
- PWM on Special Channels? HOT 3
- Quadrature Encoder Interface
- Using timer1 channel 4 for ADC triggering
- STM32F072C8T6 -- wrong binary size? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32f0xx-hal.