RGB LED cube 5x5x5  1.0
Martin Stejskal, Schmidt Dominik
 All Files Functions Variables Macros Groups Pages
Macros
animation_codes.h File Reference

Animation codes used in animation stream. More...

Go to the source code of this file.

Macros

#define cmd_anim_start   (0x8000 + (0<<8))
 Command animation start. More...
 
#define cmd_set_pwm_r   (0x8000 + (1<<8))
 Set PWM for red channel. More...
 
#define cmd_set_pwm_g   (0x8000 + (2<<8))
 Set PWM for green channel. More...
 
#define cmd_set_pwm_b   (0x8000 + (3<<8))
 Set PWM for blue channel. More...
 
#define cmd_param_2D_frame   (0x8000 + (4<<8))
 Parameters for 2D frame (activated wall) More...
 
#define param_2D_frame_void   0
 Option for cmd_param_2D_frame - Void frame. More...
 
#define param_2D_frame_same   1
 Option for cmd_param_2D_frame - Same 2D frame as previous wall. More...
 
#define param_2D_frame_ones   2
 Option for cmd_param_2D_frame - All LED on. More...
 
#define cmd_param_3D_frame   (0x8000 + (5<<8))
 Parameters for 3D frame (whole cube) More...
 
#define param_3D_frame_void   0
 Option for cmd_param_3D_frame - Void frame. More...
 
#define param_3D_frame_same   1
 Option for cmd_param_3D_frame - Same 3D frame as previous. More...
 
#define param_3D_frame_ones   2
 Option for cmd_param_3D_frame - All LED on. More...
 
#define cmd_anim_stop   (0x8000 + (127<<8))
 Command animation stop (End of animation) More...
 

Detailed Description

Animation codes used in animation stream.

Because for display 1 column is needed only 15 bits, there is one extra
bit, witch can signalizes that data are not directly for framebuffer, but
it is a special command witch, for example, can set PWM.

Instruction format (if MSB is 1, then it is possible change some settings)
|MSB| |LSB|MSB| |LSB|MSB| |LSB| +—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+
| 1 | C | C | C | C | C | C | C | V | V | V | V | V | V | V | V |
+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+—+
C - command (0~127)
V - value (0~255)

Author
Martin Stejskal

Definition in file animation_codes.h.

Macro Definition Documentation

#define cmd_anim_start   (0x8000 + (0<<8))

Command animation start.

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0x8000.

Definition at line 29 of file animation_codes.h.

#define cmd_anim_stop   (0x8000 + (127<<8))

Command animation stop (End of animation)

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0xFF00.

Definition at line 137 of file animation_codes.h.

#define cmd_param_2D_frame   (0x8000 + (4<<8))

Parameters for 2D frame (activated wall)

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0x8400.

Definition at line 70 of file animation_codes.h.

#define cmd_param_3D_frame   (0x8000 + (5<<8))

Parameters for 3D frame (whole cube)

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0x8500.

Definition at line 102 of file animation_codes.h.

#define cmd_set_pwm_b   (0x8000 + (3<<8))

Set PWM for blue channel.

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0x8300.

Definition at line 59 of file animation_codes.h.

#define cmd_set_pwm_g   (0x8000 + (2<<8))

Set PWM for green channel.

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0x8200.

Definition at line 49 of file animation_codes.h.

#define cmd_set_pwm_r   (0x8000 + (1<<8))

Set PWM for red channel.

Value 0x8000 means, that is command. Then is added command number and
shift to the left 8x (because first 8 bits is for command value).
So we get 0x8100.

Definition at line 39 of file animation_codes.h.

#define param_2D_frame_ones   2

Option for cmd_param_2D_frame - All LED on.

Used when in 2D frame are all LED on

Definition at line 92 of file animation_codes.h.

#define param_2D_frame_same   1

Option for cmd_param_2D_frame - Same 2D frame as previous wall.

It can be used for WALL1~WALL4 - NOT FOR WALL0

Definition at line 84 of file animation_codes.h.

#define param_2D_frame_void   0

Option for cmd_param_2D_frame - Void frame.

Used when in 2D frame are all LED off

Definition at line 77 of file animation_codes.h.

#define param_3D_frame_ones   2

Option for cmd_param_3D_frame - All LED on.

Used when in 3D frame are all LED on

Definition at line 124 of file animation_codes.h.

#define param_3D_frame_same   1

Option for cmd_param_3D_frame - Same 3D frame as previous.

When this command is enabled, then content of framebuffer stay same

Definition at line 116 of file animation_codes.h.

#define param_3D_frame_void   0

Option for cmd_param_3D_frame - Void frame.

Used when in 3D frame are all LED off

Definition at line 109 of file animation_codes.h.