mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-03-22 01:31:21 +03:00
Add starting sources to CANbus_stepper
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
#pragma once
|
||||
#ifndef __STM32F0_H__
|
||||
#define __STM32F0_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "stm32f0xx.h"
|
||||
|
||||
#ifndef TRUE_INLINE
|
||||
@@ -193,8 +193,8 @@ TRUE_INLINE void StartHSI48(){
|
||||
gpioport->BSRR = ((__port & gpios) << 16) | (~__port & gpios);}while(0)
|
||||
|
||||
#define pin_set(gpioport, gpios) do{gpioport->BSRR = gpios;}while(0)
|
||||
#define pin_clear(gpioport, gpios) do{gpioport->BSRR = (gpios << 16);}while(0)
|
||||
#define pin_read(gpioport, gpios) (gpioport->IDR & gpios ? 1 : 0)
|
||||
#define pin_clear(gpioport, gpios) do{gpioport->BRR = gpios;}while(0)
|
||||
#define pin_read(gpioport, gpios) ((gpioport->IDR & gpios) ? 1 : 0)
|
||||
#define pin_write(gpioport, gpios) do{gpioport->ODR = gpios;}while(0)
|
||||
|
||||
/************************* ADC *************************/
|
||||
|
||||
Reference in New Issue
Block a user