it works!

Dependencies:   SDFileSystem2 mbed

Fork of manworm_tv_raster by Bayley Wang

Committer:
bwang
Date:
Thu Oct 04 12:37:25 2018 +0000
Revision:
16:1f728d08b3a7
Parent:
14:5ee7843f2805
improved timing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dicarloj 9:2a47b9ff8911 1 #ifndef _mainh
dicarloj 9:2a47b9ff8911 2 #define _mainh
dicarloj 9:2a47b9ff8911 3
dicarloj 9:2a47b9ff8911 4 void draw_vincent_string(char* str);
dicarloj 9:2a47b9ff8911 5 void new_line();
dicarloj 9:2a47b9ff8911 6 void clear_all_text();
dicarloj 9:2a47b9ff8911 7 void draw_gfx_line(float x0, float y0, float x1, float y1);
bwang 13:9cf720873bf6 8
bwang 14:5ee7843f2805 9 // Buffer sizes
bwang 14:5ee7843f2805 10 #define V_RES 96
bwang 14:5ee7843f2805 11 #define H_RES 279
bwang 14:5ee7843f2805 12
bwang 14:5ee7843f2805 13 // Porches
bwang 14:5ee7843f2805 14 #define V_PORCH_SIZE 30
bwang 14:5ee7843f2805 15 #define H_PORCH_SIZE 25
bwang 13:9cf720873bf6 16
bwang 13:9cf720873bf6 17 // good new stuff
bwang 14:5ee7843f2805 18 #define X0 50 // start of image in X
bwang 14:5ee7843f2805 19 #define Y0 0 // start of image in Y
bwang 14:5ee7843f2805 20 #define XL 224 // 25 chars
bwang 14:5ee7843f2805 21 #define YL 96 // 20 chars
bwang 14:5ee7843f2805 22
bwang 14:5ee7843f2805 23 //video
bwang 14:5ee7843f2805 24 #define VIDEO_FRAME_SIZE (XL * YL / 2)
bwang 14:5ee7843f2805 25
bwang 14:5ee7843f2805 26 //*SD card*/
bwang 14:5ee7843f2805 27 #define DI PC_3
bwang 14:5ee7843f2805 28 #define DO PC_2
bwang 14:5ee7843f2805 29 #define SCK PB_10
bwang 14:5ee7843f2805 30 #define CS PB_12
bwang 13:9cf720873bf6 31
bwang 13:9cf720873bf6 32 extern uint8_t *im_line_va;
bwang 13:9cf720873bf6 33
bwang 13:9cf720873bf6 34 #define set_pixel(x, y, color) im_line_va[H_RES*((y)+Y0) + (x) + X0] = (color)
bwang 13:9cf720873bf6 35
dicarloj 9:2a47b9ff8911 36 #endif