Hi,
I was wondering what would be the best/preferred way to implement a HAL driver which has two different hardware peripherals.
In my case a PWM driver for a PWM peripheral and a timer peripheral capable of generating PWM signals. If they will not exist in the application at the same time there is not really a problem, but what if they do have to exist both in the same application? Is it even possible in the current HAL?
Marco
HAL driver with two different peripherals
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: HAL driver with two different peripherals
Hi,
It is possible, look at the ADC driver for the STM32F37x, it uses both the normal ADC and the SDADC, separately or at same time. A similar approach could be used for other peripherals. Start with looking at the configuration options and then the configuration structure.
Giovanni
It is possible, look at the ADC driver for the STM32F37x, it uses both the normal ADC and the SDADC, separately or at same time. A similar approach could be used for other peripherals. Start with looking at the configuration options and then the configuration structure.
Giovanni