mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-10-10 16:24:09 +00:00
added SELECT_IO and SELECT_PM macros
This commit is contained in:
parent
2c85f3b19f
commit
6c59ef668f
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: hwconf.h,v 1.1 2006/06/17 22:41:21 adamdunkels Exp $
|
||||
* @(#)$Id: hwconf.h,v 1.2 2006/10/10 21:33:26 joxe Exp $
|
||||
*/
|
||||
#ifndef __HWCONF_H__
|
||||
#define __HWCONF_H__
|
||||
@ -39,6 +39,8 @@
|
||||
|
||||
#define HWCONF_PIN(name, port, bit) \
|
||||
static CC_INLINE void name##_SELECT() {P##port##SEL &= ~(1 << bit);} \
|
||||
static CC_INLINE void name##_SELECT_IO() {P##port##SEL &= ~(1 << bit);} \
|
||||
static CC_INLINE void name##_SELECT_PM() {P##port##SEL |= 1 << bit;} \
|
||||
static CC_INLINE void name##_SET() {P##port##OUT |= 1 << bit;} \
|
||||
static CC_INLINE void name##_CLEAR() {P##port##OUT &= ~(1 << bit);} \
|
||||
static CC_INLINE int name##_READ() {return (P##port##IN & (1 << bit));} \
|
||||
|
Loading…
Reference in New Issue
Block a user