Skip to content

Commit

Permalink
Merge pull request #460 from jgromes/master
Browse files Browse the repository at this point in the history
Added support for STM32 Arduino core
  • Loading branch information
ArduCAM committed Nov 27, 2019
2 parents da898f3 + 4bacba4 commit d40c417
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ArduCAM/ArduCAM.h
Expand Up @@ -290,6 +290,22 @@
#define F(X) (X)
#endif

#if defined (ARDUINO_ARCH_STM32)
#define cbi(reg, bitmask) *reg &= ~bitmask
#define sbi(reg, bitmask) *reg |= bitmask

#define pulse_high(reg, bitmask) sbi(reg, bitmask); cbi(reg, bitmask);
#define pulse_low(reg, bitmask) cbi(reg, bitmask); sbi(reg, bitmask);

#define cport(port, data) port &= data
#define sport(port, data) port |= data

#define swap(type, i, j) {type t = i; i = j; j = t;}
#define fontbyte(x) cfont.font[x]
#define regtype volatile uint32_t
#define regsize uint32_t
#endif


/****************************************************/
/* Sensor related definition */
Expand Down

0 comments on commit d40c417

Please sign in to comment.