You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef GLOBAL_H
|
|
|
|
#define GLOBAL_H
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
#include <avr/pgmspace.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "wiring_private.h"
|
|
|
|
#include "wiring.h"
|
|
|
|
#include "WConstants.h"
|
|
|
|
|
|
|
|
#include <HardwareSerial.h>
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "SPrint/staticPrint.h"
|
|
|
|
|
|
|
|
#ifndef CI
|
|
|
|
#define CI(reg,bit) (reg & ~(bit))
|
|
|
|
#endif
|
|
|
|
#ifndef SI
|
|
|
|
#define SI(reg,bit) (reg | bit)
|
|
|
|
#endif
|
|
|
|
#ifndef BV
|
|
|
|
#define BV(bit) (1<<(bit))
|
|
|
|
#endif
|
|
|
|
#ifndef cbi
|
|
|
|
#define cbi(reg,bit) reg &= ~(BV(bit))
|
|
|
|
#endif
|
|
|
|
#ifndef sbi
|
|
|
|
#define sbi(reg,bit) reg |= (BV(bit))
|
|
|
|
#endif
|
|
|
|
#ifndef cli
|
|
|
|
#define cli() __asm__ __volatile__ ("cli" ::)
|
|
|
|
#endif
|
|
|
|
#ifndef sei
|
|
|
|
#define sei() __asm__ __volatile__ ("sei" ::)
|
|
|
|
#endif
|
|
|
|
#ifndef nop
|
|
|
|
#define nop() asm volatile ("nop")
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|