fpiot / arduino-ats

ATS programing on Arduino
MIT License
57 stars 3 forks source link

Use ring buffer made by ATS2 for serial console #3

Open master-q opened 9 years ago

master-q commented 9 years ago

AVR libc has interrupt disable function.

  uint8_t oldSREG = SREG;
  cli();
  /* Some atomic code. */
  SREG = oldSREG;
githwxi commented 9 years ago

I know that Will Blair did this a while ago. I will inform him of what you are doing.

master-q commented 9 years ago

Thank's!

master-q commented 9 years ago

Sometimes following is useful for it:

Effective ATS: Producer-Consumer http://ats-lang.sourceforge.net/EXAMPLE/EFFECTIVATS/Producer-Consumer/main.html