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

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...
 

Detailed Description

Anime maker v1.0.

Anime maker for RGB LED cube 5x5x5

Author
Martin Stejskal (marti.nosp@m.n.st.nosp@m.ej@gm.nosp@m.ail..nosp@m.com)

Definition in file anime_maker_rgb_5x5x5_led_cube.c.

Function Documentation

void ask_for_anime_name ( char *  p_animation_name)

Ask user for animation name and save it.

Data are saved thru pointer.

Parameters
p_animation_namePointer 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.

Parameters
p_fb_data_virtualPointer 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 
)
Todo:
Complete back function (even for 3D frames)

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.

Parameters
p_animation_namePointer 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.

Returns
0 if all OK

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.

Parameters
p_fb_data_virtualPointer 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.

Parameters
p_anim_streamPointer to serial data stream
i_frameInform where abort reading from stream (frame counter)
p_animation_namePointer 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.

Parameters
i_optionsOptions for ending animation.
p_animation_namePointer 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.

Parameters
p_fb_data_virtualPointer do virtual framebuffer
p_anim_streamPointer to serial data stream
i_frameInform 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.

Parameters
i_slowdown_factorSlowdown factor for animation
p_animation_namePointer to text array where animation name is saved

Definition at line 540 of file anime_maker_rgb_5x5x5_led_cube.c.