aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPiotr Esden-Tempski2013-01-06 17:52:43 -0800
committerPiotr Esden-Tempski2013-01-06 17:52:43 -0800
commitc904c3ae575e1bdb9a6fe69a25f22a254516b201 (patch)
tree3736f852dd3f37b3273d42de6607060fd0ad2d48 /examples
parent70746ccd676445481511c0e8bc6b617f7b052878 (diff)
parent88d4f020816c018e31ba48cdd975a9738ba56eed (diff)
Merging pull request #63 Improvements to STM32F1 I2C, CAN, RCC, and USB (f107)
Merge remote-tracking branch 'icd/master'
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32/f1/lisa-m-1/can/can.c4
-rw-r--r--examples/stm32/f1/other/usb_dfu/usbdfu.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/examples/stm32/f1/lisa-m-1/can/can.c b/examples/stm32/f1/lisa-m-1/can/can.c
index a4cf30d..463d7fc 100644
--- a/examples/stm32/f1/lisa-m-1/can/can.c
+++ b/examples/stm32/f1/lisa-m-1/can/can.c
@@ -135,7 +135,9 @@ void can_setup(void)
CAN_BTR_SJW_1TQ,
CAN_BTR_TS1_3TQ,
CAN_BTR_TS2_4TQ,
- 12)) /* BRP+1: Baud rate prescaler */
+ 12, /* BRP+1: Baud rate prescaler */
+ false, /* loopback mode */
+ false)) /* silent mode */
{
gpio_set(GPIOA, GPIO8); /* LED0 off */
gpio_set(GPIOB, GPIO4); /* LED1 off */
diff --git a/examples/stm32/f1/other/usb_dfu/usbdfu.c b/examples/stm32/f1/other/usb_dfu/usbdfu.c
index 268274e..44dde16 100644
--- a/examples/stm32/f1/other/usb_dfu/usbdfu.c
+++ b/examples/stm32/f1/other/usb_dfu/usbdfu.c
@@ -249,6 +249,8 @@ int main(void)
AFIO_MAPR |= AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON;
gpio_set_mode(GPIOA, GPIO_MODE_INPUT, 0, GPIO15);
+ rcc_peripheral_enable_clock(&RCC_AHBENR, RCC_AHBENR_OTGFSEN);
+
usbd_dev = usbd_init(&stm32f107_usb_driver, &dev, &config, usb_strings);
usbd_set_control_buffer_size(usbd_dev, sizeof(usbd_control_buffer));
usbd_register_control_callback(