Commits

F Malpartida  committed 5dc9d65

Made changes to try compatibility with CHIPKit.

Placed architecture dependent includes under __AVR__ conditional compilation define.

  • Participants
  • Parent commits 7091000

Comments (0)

Files changed (5)

 // (https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/
 //   cores/pic32/wiring_digital.c)
 // ---------------------------------------------------------------------------
-#include <util/atomic.h> // for critical section management
 #include "FastIO.h"
 
 fio_register fio_pinToOutputRegister(uint8_t pin, uint8_t initial_state)
 // (https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/
 //   cores/pic32/wiring_digital.c)
 // ---------------------------------------------------------------------------
-#ifndef FAST_IO_H
-#define FAST_IO_H
+#ifndef _FAST_IO_H_
+#define _FAST_IO_H_
 
 #if (ARDUINO <  100)
 #include <WProgram.h>
 #include <inttypes.h>
 #include <util/delay.h>
 
+#ifdef __AVR__
+#include <util/atomic.h> // for critical section management
+#endif
+
 
 /*!
  @defined 
 // ---------------------------------------------------------------------------
 typedef uint8_t fio_bit;
 
+/*!
+    @typedef 
+    @abstract   Type definitions for FAST_IOs o NATIVE IDE IO
+    @field      fio_register: IO control register
+*/
 
 #ifndef FIO_FALLBACK
 typedef volatile uint8_t *fio_register;

File LiquidCrystal_SR.cpp

 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-#include <util/atomic.h> // for critical section management
 
 #if (ARDUINO <  100)
 #include <WProgram.h>

File LiquidCrystal_SR_LCD3.cpp

 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-#include <util/atomic.h> // for critical section management
 
 #if (ARDUINO <  100)
 #include <WProgram.h>
 #else
 #include <Arduino.h>
 #endif
+#include "FastIO.h"
 #include "LiquidCrystal_SR_LCD3.h"
 
 

File LiquidCrystal_SR_LCD3.h

 
 #include <inttypes.h>
 #include "LCD.h"
-#include "FastIO.h"
 
 
 class LiquidCrystal_SR_LCD3 : public LCD