diff options
author | vg <vgm+dev@devys.org> | 2020-07-07 16:24:01 +0200 |
---|---|---|
committer | vg <vgm+dev@devys.org> | 2020-07-07 16:24:01 +0200 |
commit | 66dcf910bd4744d8ced56cb9586aa937a1a2d4c5 (patch) | |
tree | df4dca1ae4af1e5df0be0d1f4f2cd0d54751f8e8 /avr-test/src/cube.h | |
download | hic-66dcf910bd4744d8ced56cb9586aa937a1a2d4c5.tar.gz hic-66dcf910bd4744d8ced56cb9586aa937a1a2d4c5.tar.bz2 hic-66dcf910bd4744d8ced56cb9586aa937a1a2d4c5.zip |
Diffstat (limited to 'avr-test/src/cube.h')
-rw-r--r-- | avr-test/src/cube.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/avr-test/src/cube.h b/avr-test/src/cube.h new file mode 100644 index 0000000..01f19da --- /dev/null +++ b/avr-test/src/cube.h @@ -0,0 +1,32 @@ +#ifndef CUBE_H +#define CUBE_H + +// Some of the functions are created to be portable +// These functions will work on cubes of different sizes by +// changing this constant +#define CUBE_SIZE 8 +#define CUBE_BYTES 64 + +// If you change this to anything greather than 8, you also have +// change how the cube buffer works and probably all the functions +// in draw.c + +// Cube buffer +// Data from this array is loaded onto the cube for each duty cycle +extern volatile unsigned char cube[CUBE_SIZE][CUBE_SIZE]; + +// Framebuffer +// Animations that take a lot of time to compute are temporarily +// stored to this array, then loaded into cube[8][8] when the image +// is ready to be displayed +extern volatile unsigned char fb[CUBE_SIZE][CUBE_SIZE]; + +// Some effects can render on different axis +// for example send pixels along an axis +// for better readability, we use the following predefined constants +#define AXIS_X 0x78 +#define AXIS_Y 0x79 +#define AXIS_Z 0x7a + +#endif + |