added support for Arduino Leonardo (and maybe Mega1280/2560, untested)

This commit is contained in:
Christian Kroll 2014-05-19 07:13:48 +02:00
parent f65ab6eeba
commit c184fcbf0f
7 changed files with 919 additions and 194 deletions

View File

@ -8,6 +8,7 @@ comment "General Setup"
choice 'Target MCU' \
"ATmega8 atmega8 \
ATmega32 atmega32 \
ATmega32U4 atmega32u4 \
ATmega328 atmega328 \
ATmega328p atmega328p \
ATmega644 atmega644 \

View File

@ -0,0 +1,125 @@
#
# Automatically generated by make menuconfig: don't edit
#
#
# General Setup
#
MCU=atmega32u4
FREQ=16000000
#
# Borg Hardware
#
NUM_ROWS=9
NUM_COLS=14
NUMPLANE=3
BORG_HW=HW_LOLSHIELD
#
# lolshield setup
#
USER_TIMER0_FOR_WAIT=1
BRIGHTNESS=127
#
# Features
#
RANDOM_SUPPORT=y
# LAP_TIME_EXTENSION is not set
SCROLLTEXT_SUPPORT=y
SCROLLTEXT_FONT=FONT_C64
SCROLLTEXT_BUFFER_SIZE=128
SCROLL_X_SPEED=20
SCROLL_Y_SPEED=20
SCROLLTEXT_TEXT="</#Borgware 2D"
# RFM12_SUPPORT is not set
JOYSTICK_SUPPORT=y
# PARALLEL_JOYSTICK_SUPPORT is not set
# NES_PAD_SUPPORT is not set
# RFM12_JOYSTICK_SUPPORT is not set
# HC165_JOYSTICK_SUPPORT is not set
NULL_JOYSTICK_SUPPORT=y
# CAN_SUPPORT is not set
# MENU_SUPPORT is not set
#
# Games
#
GAME_TETRIS_CORE=y
# GAME_TETRIS is not set
# GAME_BASTET is not set
# GAME_TETRIS_FP is not set
# GAME_SPACE_INVADERS is not set
# GAME_SNAKE is not set
GAME_BREAKOUT=y
#
# Animations
#
ANIMATION_SCROLLTEXT=y
ANIMATION_SPIRAL=y
SPIRAL_DELAY=5
ANIMATION_JOERN1=y
ANIMATION_SNAKE=y
SNAKE_CYCLE_DELAY=100
SNAKE_TERMINATION_DELAY=60
SNAKE_MAX_LENGTH=64
SNAKE_MAX_APPLES=10
ANIMATION_CHECKERBOARD=y
ANIMATION_FIRE=y
FIRE_S=30
FIRE_N=5
FIRE_DIV=44
FIRE_DELAY=50
FIRE_CYCLES=800
ANIMATION_MATRIX=y
MATRIX_STREAMER_NUM=30
MATRIX_CYCLES=500
MATRIX_DELAY=60
ANIMATION_RANDOM_BRIGHT=y
ANIMATION_STONEFLY=y
ANIMATION_FLYINGDOTS=y
ANIMATION_GAMEOFLIFE=y
GOL_DELAY=100
GOL_CYCLES=360
ANIMATION_BREAKOUT=y
# ANIMATION_MHERWEG is not set
ANIMATION_MOIRE=y
ANIMATION_LTN_ANT=y
# ANIMATION_TIME is not set
TIME_MASTER_ADDR=00
TIME_UPDATE_TIMEOUT=50
ANIMATION_BMSCROLLER=y
# ANIMATION_LABORLOGO is not set
ANIMATION_AMPHIBIAN=y
# ANIMATION_LOGO_OOS is not set
ANIMATION_FAIRYDUST=y
#
# Fixed-point math patterns
#
ANIMATION_PLASMA=y
FP_PLASMA_DELAY=10
ANIMATION_PSYCHEDELIC=y
FP_PSYCHO_DELAY=25
ANIMATION_BLACKHOLE=y
ANIMATION_SQUARES=y
# ANIMATION_TESTS is not set
# ANIMATION_OFF is not set
#
# small Animations
#
# SMALLANIMATION_ROWWALK is not set
SMALLANIMATION_ROWWALK_SPEED=50
SMALLANIMATION_ROWWALK_COUNT=10
# SMALLANIMATION_COLWALK is not set
SMALLANIMATION_COLWALK_SPEED=50
SMALLANIMATION_COLWALK_COUNT=10
# SMALLANIMATION_ROWBOUNCE is not set
SMALLANIMATION_ROWBOUNCE_SPEED=50
SMALLANIMATION_ROWBOUNCE_COUNT=10
# SMALLANIMATION_COLBOUNCE is not set
SMALLANIMATION_COLBOUNCE_SPEED=50
SMALLANIMATION_COLBOUNCE_COUNT=10

View File

@ -20,6 +20,7 @@ BORG_HW=HW_LOLSHIELD
# lolshield setup
#
USER_TIMER0_FOR_WAIT=1
BRIGHTNESS=127
#
# Features

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@ choice 'Hardware Driver' \
Andre-Borg HW_BORG_ANDRE \
Laufschrift-Borg HW_BORG_LS \
Laufschrift-Borg-MH HW_BORG_MH \
LoL-Shield/Diavolino HW_LOLSHIELD \
LoL-Shield HW_LOLSHIELD \
FFM-Jochen HW_BORG_LSJO \
FFM-LedBrett HW_LEDBRETT \
Borg-Mini HW_BORG_MINI \

View File

@ -3,4 +3,6 @@ comment "lolshield setup"
define_int USER_TIMER0_FOR_WAIT 1
uint "Brightness (0-127)" BRIGHTNESS 127
endmenu

View File

@ -21,7 +21,6 @@ extern jmp_buf newmode_jmpbuf;
void wait(int ms){
/* Always use Timer1 except for the Arduino/LoL Shield platform. */
#ifndef USER_TIMER0_FOR_WAIT
TCCR1B = _BV(WGM12) | _BV(CS12); //CTC Mode, clk/256
@ -36,7 +35,6 @@ void wait(int ms){
OCR0A = (F_CPU/256000); //1000Hz
#endif
for(;ms>0;ms--){
#ifdef CAN_SUPPORT
@ -57,7 +55,7 @@ void wait(int ms){
}
#endif
#if defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__) || (__AVR_ATmega1284P__) || defined (__AVR_ATmega1284__)
#if defined (__AVR_ATmega32U4__) || defined (__AVR_ATmega644P__) || defined (__AVR_ATmega644__) || defined (__AVR_ATmega328__) || defined (__AVR_ATmega328P__) || (__AVR_ATmega1284P__) || defined (__AVR_ATmega1284__)
/* Timer1 for the masses */
# ifndef USER_TIMER0_FOR_WAIT
while(!(TIFR1 & _BV(OCF1A))); //wait for compare match flag