Initial commit

This commit is contained in:
jaseg 2024-06-08 18:45:51 +02:00
commit b0d059fb24
34 changed files with 18172 additions and 0 deletions

14
include/iomacros.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef __IOMACROS_H__
#define __IOMACROS_H__
#define IN(pin) (0)
#define OUT(pin) (1<<(2*(pin)))
#define AF(pin) (2<<(2*(pin)))
#define ANALOG(pin) (3<<(2*(pin)))
#define CLEAR(pin) (~(3<<(2*(pin))))
#define AFRL(pin, val) ((val) << ((pin)*4))
#define AFRH(pin, val) ((val) << (((pin)-8)*4))
#endif __IOMACROS_H__