RGB LED cube 5x5x5
1.0
Martin Stejskal, Schmidt Dominik
|
Anime maker v1.0. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "settings.h"
#include "animation_codes.h"
Go to the source code of this file.
Macros | |
#define | version "1.0 beta" |
Version. | |
Functions | |
void | ask_for_anime_name (char *p_animation_name) |
Ask user for animation name and save it. More... | |
int | ask_for_slow_down_factor (void) |
uint8_t | ask_for_pwm (char c_color) |
void | create_files_and_fill_headers (char *p_animation_name) |
Create new files in "generated_anime_folder" and write headers. More... | |
void | write_start_of_animation (int i_slowdown_factor, char *p_animation_name) |
Write start of animation code to file with animation. More... | |
void | create_animation (char *p_animation_name, int i_slowdown_factor) |
void | write_end_of_animation (int i_options, char *p_animation_name) |
Write end of animation. More... | |
void | write_frame (uint8_t(*p_fb_data_virtual)[5][5][5], uint16_t(*p_anim_stream)[max_size_anim_stream], uint16_t(*p_commands), uint32_t i_frame) |
Write actual frame (3D) to data stream. More... | |
void | write_content_to_file (uint16_t(*p_anim_stream)[max_size_anim_stream], uint32_t i_frame, char *p_animation_name) |
Write data from p_anim_stream to file. More... | |
void | jump_out_to_next_screen (void) |
Print a lots of newline characters, so actual screen go away. | |
void | clear_virtual_framebuffer (uint8_t(*p_fb_data_vitual)[5][5][5]) |
Clear (set 0) in whole framebuffer. More... | |
void | set_virtual_framebuffer (uint8_t(*p_fb_data_virtual)[5][5][5]) |
Set (set 1) in whole framebuffer. More... | |
void | clear_real_framebuffer (uint16_t(*p_anim_stream)[max_size_anim_stream]) |
void | show_preview (uint8_t(*p_fb_data_virtual)[5][5][5], uint32_t i_frame_counter, uint8_t i_wall, uint8_t i_column, uint8_t i_led_level, uint8_t i_pwm_r, uint8_t i_pwm_g, uint8_t i_pwm_b, float f_virtual_time) |
int | main (void) |
Main program structure. More... | |
Anime maker v1.0.
Anime maker for RGB LED cube 5x5x5
Definition in file anime_maker_rgb_5x5x5_led_cube.c.
void ask_for_anime_name | ( | char * | p_animation_name) |
Ask user for animation name and save it.
Data are saved thru pointer.
p_animation_name | Pointer to text array where animation name is saved |
Definition at line 131 of file anime_maker_rgb_5x5x5_led_cube.c.
void clear_virtual_framebuffer | ( | uint8_t(*) | p_fb_data_vitual[5][5][5]) |
Clear (set 0) in whole framebuffer.
p_fb_data_virtual | Pointer to framebuffer |
Definition at line 1583 of file anime_maker_rgb_5x5x5_led_cube.c.
void create_animation | ( | char * | p_animation_name, |
int | i_slowdown_factor | ||
) |
Definition at line 599 of file anime_maker_rgb_5x5x5_led_cube.c.
void create_files_and_fill_headers | ( | char * | p_animation_name) |
Create new files in "generated_anime_folder" and write headers.
Create files named by animation_name and write some common data.
p_animation_name | Pointer to text array where animation name is saved |
Definition at line 399 of file anime_maker_rgb_5x5x5_led_cube.c.
int main | ( | void | ) |
Main program structure.
Definition at line 82 of file anime_maker_rgb_5x5x5_led_cube.c.
void set_virtual_framebuffer | ( | uint8_t(*) | p_fb_data_virtual[5][5][5]) |
Set (set 1) in whole framebuffer.
p_fb_data_virtual | Pointer to framebuffer |
Definition at line 1601 of file anime_maker_rgb_5x5x5_led_cube.c.
void write_content_to_file | ( | uint16_t(*) | p_anim_stream[max_size_anim_stream], |
uint32_t | i_frame, | ||
char * | p_animation_name | ||
) |
Write data from p_anim_stream to file.
p_anim_stream | Pointer to serial data stream |
i_frame | Inform where abort reading from stream (frame counter) |
p_animation_name | Pointer to p_animation_name. Need for file modification |
Definition at line 1154 of file anime_maker_rgb_5x5x5_led_cube.c.
void write_end_of_animation | ( | int | i_options, |
char * | p_animation_name | ||
) |
Write end of animation.
i_options | Options for ending animation. |
p_animation_name | Pointer to text array where animation name is saved |
Definition at line 1510 of file anime_maker_rgb_5x5x5_led_cube.c.
void write_frame | ( | uint8_t(*) | p_fb_data_virtual[5][5][5], |
uint16_t(*) | p_anim_stream[max_size_anim_stream], | ||
uint16_t * | p_commands, | ||
uint32_t | i_frame | ||
) |
Write actual frame (3D) to data stream.
p_fb_data_virtual | Pointer do virtual framebuffer |
p_anim_stream | Pointer to serial data stream |
i_frame | Inform where continue |
Definition at line 1052 of file anime_maker_rgb_5x5x5_led_cube.c.
void write_start_of_animation | ( | int | i_slowdown_factor, |
char * | p_animation_name | ||
) |
Write start of animation code to file with animation.
i_slowdown_factor | Slowdown factor for animation |
p_animation_name | Pointer to text array where animation name is saved |
Definition at line 540 of file anime_maker_rgb_5x5x5_led_cube.c.