2011-12-20 22:36:04 +01:00
|
|
|
/*
|
2014-10-15 21:39:06 +02:00
|
|
|
* økoyono MiniLEDCube
|
2011-12-09 23:15:06 +01:00
|
|
|
*
|
2011-12-20 22:36:04 +01:00
|
|
|
* By Kai Lauterbach (klaute at web dot de) 11/2011
|
2011-12-09 23:15:06 +01:00
|
|
|
*
|
|
|
|
* Based on http://mosfetkiller.de/?s=miniledcube
|
|
|
|
*
|
|
|
|
* License: General Public License (GPL v3)
|
|
|
|
*
|
|
|
|
*/
|
2011-10-15 11:32:43 +02:00
|
|
|
|
|
|
|
#ifndef __main_h__
|
|
|
|
#define __main_h__
|
|
|
|
|
2011-10-19 00:04:59 +02:00
|
|
|
// Includes
|
|
|
|
#include "globals.h"
|
2011-10-15 11:32:43 +02:00
|
|
|
|
2014-09-22 23:24:05 +02:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
2011-10-15 11:32:43 +02:00
|
|
|
#include <avr/interrupt.h>
|
|
|
|
#include <avr/io.h>
|
2011-12-18 19:35:47 +01:00
|
|
|
#include <avr/eeprom.h>
|
2011-12-17 22:03:57 +01:00
|
|
|
|
2011-12-27 12:48:34 +01:00
|
|
|
/*! \brief Cube-Data
|
|
|
|
* bit 0 - 8 = level 1
|
|
|
|
* bit 9 - 17 = level 2
|
|
|
|
* bit 18 - 26 = level 3
|
|
|
|
* bit 27 - 31 = The delay in ISR calls multiplied with 8 until
|
|
|
|
* the next frame will be shown (load from the EEPROM)
|
|
|
|
*/
|
2014-09-29 22:43:38 +02:00
|
|
|
union {
|
|
|
|
uint32_t all;
|
|
|
|
uint8_t bytes[4];
|
|
|
|
} frame;
|
|
|
|
// uint32_t frame;
|
2011-12-20 22:36:04 +01:00
|
|
|
uint8_t mode = MODE_ANIMATION_LOOP; // firmware mode
|
2014-09-22 23:24:05 +02:00
|
|
|
|
2011-12-20 22:36:04 +01:00
|
|
|
// eeprom array of the animation
|
|
|
|
uint32_t eep_anim[MAX_EEPROM_FRAMES] EEMEM;
|
|
|
|
|
|
|
|
// function prototypes
|
2011-10-15 11:32:43 +02:00
|
|
|
|
|
|
|
extern void init_usb(void);
|
|
|
|
extern void usbPoll(void);
|
|
|
|
|
|
|
|
#endif // __main_h__
|