micropython/stmhal/mphal.h
Damien George 7a37f647a5 Merge branch 'teensy-new' of github.com:dhylands/micropython into dhylands-teensy-new
Conflicts:
	stmhal/pin_named_pins.c
	stmhal/readline.c

Renamed HAL_H to MICROPY_HAL_H.  Made stmhal/mphal.h which intends to
define the generic Micro Python HAL, which in stmhal sits above the ST
HAL.
2014-07-02 13:42:37 +01:00

8 lines
327 B
C

// We use the ST Cube HAL library for most hardware peripherals
#include <stm32f4xx_hal.h>
// Basic GPIO functions
#define GPIO_read_pin(gpio, pin) (((gpio)->IDR >> (pin)) & 1)
#define GPIO_set_pin(gpio, pin_mask) (((gpio)->BSRRL) = (pin_mask))
#define GPIO_clear_pin(gpio, pin_mask) (((gpio)->BSRRH) = (pin_mask))