Initial commit
This commit is contained in:
commit
b0d059fb24
34 changed files with 18172 additions and 0 deletions
14
include/iomacros.h
Normal file
14
include/iomacros.h
Normal 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__
|
||||
Loading…
Add table
Add a link
Reference in a new issue