12 Replies Latest reply on Jun 26, 2015 3:47 PM by Intel_Alvarado

    How to port AVR DMX code to Intel Quark (on Edison) ?



      I'm new to Intel Edison development and just a bit of prior Arduino knowledge behind so please bare with me
      I am trying to port some Arduino code and an implementation of the DMX protocol, but I think I need to
      find equivalent Quark calls for the existing AVR code.

      Here are the functions/constants I will need to replicate on Intel Edison:

      1. _SFR_IO_ADDR()
      2. _SFR_IO8()
      3. cli() / noInterrupts()
      4. sei() / interrupts()
      5. digitalPinToBitMask()

      From what I understand in this post, interrupts()/noInterrupts() can be achieved with libmraa.
      Would I use that in plain c on the linux side or from the Arduino IDE ?

      I found digitalPinToBitMask() in hardware/arduino/edison/cores/arduino/wiring_digital.h but I get an error when I try to use it:

      C:\Users\HM\Downloads\Windows\arduino-windows-patched-1.0.4\arduino-windows-1.0.4\arduino-1.5.3-Intel.1.0.4\hardware\arduino\edison\cores\arduino/wiring_digital.h:106:56: error: 'PinDescription' has no member named 'ulPin' #define digitalPinToBitMask(P)  ( g_APinDescription[P].ulPin )

      I've also found this GPIO reference I'm going through at the moment:

      Is it feasible to port the DMX code to the IntelEdison ? Where could I find the AVR equivalent calls/constants for Edison ?
      If the AVR Arduino code can be ported/updated and still work in the Arduino IDE for Edison that would be cool,
      but if not I wouldn't mind porting my existing Arduino DMX code to c+libmraa as long as it works.

      Thank you,


      P.S. This is cross-post as suggested by matthias-hahn (Intel)