include/stdlib.h
changeset 9 49643ef9d3d2
parent 6 c5ab059eadc1
--- a/include/stdlib.h	Thu Sep 25 00:55:47 2014 +0300
+++ b/include/stdlib.h	Wed Oct 08 23:19:03 2014 +0300
@@ -1,5 +1,5 @@
-#ifndef QMSK_ARDUINO_STDLIB_H
-#define QMSK_ARDUINO_STDLIB_H
+#ifndef QMSK_STDLIB_H
+#define QMSK_STDLIB_H
 
 #include <stdint.h>
 
@@ -8,26 +8,6 @@
 
 typedef uint8_t byte;
 
-typedef volatile uint8_t ioport_t;
-
-static inline ioport_t tbi(ioport_t *port, byte bit)
-{
-    return *port & (1 << bit);
-}
-
-static inline void sbi(ioport_t *port, byte bit)
-{
-    *port |= (1 << bit);
-}
-
-static inline void cbi(ioport_t *port, byte bit)
-{
-    *port &= ~(1 << bit);
-}
-
-static inline void xbi(ioport_t *port, byte bit)
-{
-    *port ^= (1 << bit);
-}
+#include "port.h"
 
 #endif