Replacement for regular GPIO (DigitalIn, DigitalOut, DigitalInOut) classes which has superior speed.

Fork of FastIO by Erik -

Files at this revision

API Documentation at this revision

Comitter:
Sissors
Date:
Tue Sep 20 20:41:42 2016 +0000
Parent:
21:a1dfa6c65400
Child:
23:23a43a288e2c
Commit message:
Fixed bug in enabling of port hardware of the F030 (via: https://developer.mbed.org/users/viquiram/)

Changed in this revision

Devices/FastIO_NUCLEO_F030.h Show annotated file Show diff for this revision Revisions of this file
--- a/Devices/FastIO_NUCLEO_F030.h	Tue Sep 20 09:28:40 2016 +0000
+++ b/Devices/FastIO_NUCLEO_F030.h	Tue Sep 20 20:41:42 2016 +0000
@@ -10,7 +10,7 @@
 #define PINMASK             (1 << STM_PIN(pin))
 #define PORT                ((GPIO_TypeDef *)(GPIOA_BASE + 0x0400 * STM_PORT(pin)))
 
-#define INIT_PIN            RCC->AHBENR |= (1 << STM_PORT(pin)); (PORT->MODER &= ~(GPIO_MODER_MODER0_1 << (STM_PIN(pin) * 2))); container.mask = PINMASK
+#define INIT_PIN            RCC->AHBENR |= (1 << (STM_PORT(pin) + 17)); (PORT->MODER &= ~(GPIO_MODER_MODER0_1 << (STM_PIN(pin) * 2))); container.mask = PINMASK
 #define DESTROY_PIN     
 
 #define SET_DIR_INPUT       (PORT->MODER &= ~(GPIO_MODER_MODER0_0 << (STM_PIN(pin) * 2)))
@@ -23,3 +23,4 @@
 #define READ_PIN            ((PORT->IDR & container.mask) ? 1 : 0)
 
 #endif
+