Updated libopencm3 to current master. Made all examples compile again.
Be specifically careful with the usb examples. There is likely some breakage to be expected, not sure I updated all the drivers to the correct types for the respective chips.
This commit is contained in:
@@ -37,7 +37,7 @@ int _write(int file, char *ptr, int len);
|
||||
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
/* Enable GPIOD clock for LED & USARTs. */
|
||||
rcc_periph_clock_enable(RCC_GPIOG);
|
||||
rcc_periph_clock_enable(RCC_GPIOA);
|
||||
|
||||
@@ -27,7 +27,7 @@ uint16_t exti_line_state;
|
||||
/* Set STM32 to 168 MHz. */
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
}
|
||||
|
||||
static void gpio_setup(void)
|
||||
|
||||
@@ -34,7 +34,7 @@ uint8_t waveform[256];
|
||||
/*--------------------------------------------------------------------*/
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/* Set STM32 to 168 MHz. */
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* Enable GPIOG clock. */
|
||||
rcc_periph_clock_enable(RCC_GPIOG);
|
||||
|
||||
@@ -63,7 +63,7 @@ uint32_t mtime(void)
|
||||
void clock_setup(void)
|
||||
{
|
||||
/* Base board frequency, set to 168Mhz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* clock rate / 168000 to get 1mS interrupt rate */
|
||||
systick_set_reload(168000);
|
||||
|
||||
@@ -61,7 +61,7 @@ uint32_t mtime(void)
|
||||
void clock_setup(void)
|
||||
{
|
||||
/* Base board frequency, set to 168Mhz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* clock rate / 168000 to get 1mS interrupt rate */
|
||||
systick_set_reload(168000);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* set up the SysTick function (1mS interrupts) */
|
||||
systick_set_clocksource(STK_CSR_CLKSOURCE_AHB);
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
static void clock_setup(void)
|
||||
{
|
||||
/* Enable high-speed clock at 120MHz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_120MHZ]);
|
||||
|
||||
/* Enable GPIOG clock for LED & USARTs. */
|
||||
rcc_periph_clock_enable(RCC_GPIOG);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
static void rcc_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_120MHZ]);
|
||||
|
||||
/* Enable GPIOG clock for onboard leds. */
|
||||
rcc_periph_clock_enable(RCC_GPIOG);
|
||||
|
||||
@@ -61,7 +61,7 @@ uint32_t mtime(void)
|
||||
void clock_setup(void)
|
||||
{
|
||||
/* Base board frequency, set to 168Mhz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* clock rate / 168000 to get 1mS interrupt rate */
|
||||
systick_set_reload(168000);
|
||||
|
||||
@@ -61,7 +61,7 @@ uint32_t mtime(void)
|
||||
void clock_setup(void)
|
||||
{
|
||||
/* Base board frequency, set to 168Mhz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* clock rate / 168000 to get 1mS interrupt rate */
|
||||
systick_set_reload(168000);
|
||||
|
||||
@@ -65,7 +65,7 @@ static void systick_setup(void)
|
||||
/* Set STM32 system clock to 168 MHz. */
|
||||
static void clock_setup(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* Enable GPIOG clock. */
|
||||
rcc_periph_clock_enable(RCC_GPIOG);
|
||||
|
||||
@@ -62,7 +62,7 @@ uint32_t mtime(void)
|
||||
void clock_setup(void)
|
||||
{
|
||||
/* Base board frequency, set to 168Mhz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* clock rate / 168000 to get 1mS interrupt rate */
|
||||
systick_set_reload(168000);
|
||||
|
||||
@@ -61,7 +61,7 @@ uint32_t mtime(void)
|
||||
void clock_setup(void)
|
||||
{
|
||||
/* Base board frequency, set to 168Mhz */
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_168MHZ]);
|
||||
|
||||
/* clock rate / 168000 to get 1mS interrupt rate */
|
||||
systick_set_reload(168000);
|
||||
|
||||
@@ -227,7 +227,7 @@ int main(void)
|
||||
{
|
||||
usbd_device *usbd_dev;
|
||||
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_120MHZ]);
|
||||
|
||||
rcc_periph_clock_enable(RCC_GPIOB);
|
||||
rcc_periph_clock_enable(RCC_OTGHS);
|
||||
|
||||
@@ -362,7 +362,7 @@ int main(void)
|
||||
{
|
||||
usbd_device *usbd_dev;
|
||||
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_120MHZ]);
|
||||
|
||||
rcc_periph_clock_enable(RCC_GPIOA);
|
||||
rcc_periph_clock_enable(RCC_GPIOB);
|
||||
|
||||
@@ -105,7 +105,7 @@ static uint8_t usbd_control_buffer[128];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_120MHZ]);
|
||||
rcc_clock_setup_hse_3v3(&rcc_hse_8mhz_3v3[RCC_CLOCK_3V3_120MHZ]);
|
||||
|
||||
rcc_periph_clock_enable(RCC_GPIOB);
|
||||
rcc_periph_clock_enable(RCC_OTGHS);
|
||||
|
||||
Reference in New Issue
Block a user