Update F1 libs with new header file locations.
This commit is contained in:
parent
a4935eef57
commit
ce7dd46aef
|
@ -31,7 +31,7 @@
|
|||
* reg16 = adc_read(ADC1, ADC_CH_0);
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/adc.h>
|
||||
#include <libopencm3/stm32/f1/adc.h>
|
||||
|
||||
void rcc_set_adc_clk(u32 prescaler)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <libopencm3/stm32/can.h>
|
||||
#include <libopencm3/stm32/rcc.h>
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
|
||||
void can_reset(u32 canport)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/dma.h>
|
||||
#include <libopencm3/stm32/f1/dma.h>
|
||||
|
||||
void dma_enable_mem2mem_mode(u32 dma, u8 channel)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/ethernet.h>
|
||||
#include <libopencm3/stm32/f1/ethernet.h>
|
||||
|
||||
void eth_smi_write(u8 phy, u8 reg, u16 data)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include <libopencm3/stm32/exti.h>
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
|
||||
void exti_set_trigger(u32 extis, exti_trigger_type trig)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/flash.h>
|
||||
#include <libopencm3/stm32/f1/flash.h>
|
||||
|
||||
void flash_prefetch_buffer_enable(void)
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* - GPIO remapping support
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/gpio.h>
|
||||
#include <libopencm3/stm32/f1/gpio.h>
|
||||
|
||||
void gpio_set_mode(u32 gpioport, u8 mode, u8 cnf, u16 gpios)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/nvic.h>
|
||||
#include <libopencm3/stm32/f1/nvic.h>
|
||||
|
||||
void nvic_enable_irq(u8 irqn)
|
||||
{
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/rcc.h>
|
||||
#include <libopencm3/stm32/flash.h>
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
#include <libopencm3/stm32/f1/flash.h>
|
||||
|
||||
/* Set the default ppre1 and ppre2 peripheral clock frequencies after reset */
|
||||
u32 rcc_ppre1_frequency = 8000000;
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/rcc.h>
|
||||
#include <libopencm3/stm32/rtc.h>
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
#include <libopencm3/stm32/f1/rtc.h>
|
||||
#include <libopencm3/stm32/pwr.h>
|
||||
|
||||
void rtc_awake_from_off(osc_t clock_source)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/systick.h>
|
||||
#include <libopencm3/stm32/f1/systick.h>
|
||||
|
||||
void systick_set_reload(u32 value)
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <libopencm3/stm32/timer.h>
|
||||
#include <libopencm3/stm32/rcc.h>
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
|
||||
void timer_reset(u32 timer_peripheral)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libopencm3/stm32/rcc.h>
|
||||
#include <libopencm3/stm32/f1/rcc.h>
|
||||
|
||||
#include <libopencm3/stm32/usart.h>
|
||||
|
||||
|
|
|
@ -77,9 +77,9 @@ void gpio_set_output_options(u32 gpioport, u8 otype, u8 speed, u16 gpios)
|
|||
|
||||
for (i = 0; i < 16; i++) {
|
||||
if (!((1 << i) & gpios))
|
||||
continue
|
||||
ospeedr &= ~GPIO_OSPEEDR_MASK(i);
|
||||
ospeedr |= GPIO_OSPEEDR(i, mode);
|
||||
continue;
|
||||
ospeedr &= ~GPIO_OSPEED_MASK(i);
|
||||
ospeedr |= GPIO_OSPEED(i, speed);
|
||||
}
|
||||
|
||||
GPIO_OSPEEDR(gpioport) = ospeedr;
|
||||
|
@ -95,14 +95,14 @@ void gpio_set_af(u32 gpioport, u8 alt_func_num, u16 gpios)
|
|||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (!((1 << i) & gpios))
|
||||
continue
|
||||
continue;
|
||||
afrl &= GPIO_AFR_MASK(i);
|
||||
afrl |= GPIO_AFR(i, alt_func_num);
|
||||
}
|
||||
|
||||
for (i = 8; i < 16; i++) {
|
||||
if (!((1 << i) & gpios))
|
||||
continue
|
||||
continue;
|
||||
afrl &= GPIO_AFR_MASK(i-8);
|
||||
afrh |= GPIO_AFR(i-8, alt_func_num);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue