-
Notifications
You must be signed in to change notification settings - Fork 1
/
funkey_prod_screens.h
67 lines (54 loc) · 1.64 KB
/
funkey_prod_screens.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef __FUNKEY_PROD_SCREENS__
#define __FUNKEY_PROD_SCREENS__
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include <SDL/SDL.h>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL_image.h>
#include "prodScreen_failScreen.h"
#include "prodScreen_waitBattery.h"
#include "prodScreen_displayTest.h"
#include "prodScreen_brightnessTest.h"
#include "prodScreen_buttonsTest.h"
#include "prodScreen_speakerTest.h"
#include "prodScreen_ledTest.h"
#include "prodScreen_magnetTest.h"
#include "prodScreen_validation.h"
#include "prodScreen_showImage.h"
#include "prodScreen_gamma.h"
#include "prodScreen_tearingTest.h"
/// Defines
#define ERROR_MANUAL_FAIL 2
#define SCREEN_HORIZONTAL_SIZE 240
#define SCREEN_VERTICAL_SIZE 240
#define SLEEP_PERIOD_MS 100
#define COLOR_BG_R 255
#define COLOR_BG_G 255
#define COLOR_BG_B 255
#define COLOR_TEXT_R 130
#define COLOR_TEXT_G 30
#define COLOR_TEXT_B 160
#define Y_PADDING 10
#define X_PADDING 20
#define FOLDER_RESSOURCES "/usr/local/share/ProdResources"
#define FONT_NAME_TITLE FOLDER_RESSOURCES"/FreeSansBold.ttf"
#define FONT_SIZE_TITLE 20
#define FONT_NAME_INFO FONT_NAME_TITLE
#define FONT_SIZE_INFO 18
typedef struct
{
char *cmd_line_argument;
int (*ptr_function_launch_test)(int argc, char *argv[]);
int nb_args_needed;
const char *args_description;
} s_prod_test;
/// Global variables
extern SDL_Surface *hw_surface;
extern TTF_Font *font_title;
extern TTF_Font *font_info;
extern SDL_Color bg_color;
extern SDL_Color text_color;
extern char *prog_title;
#endif //__FUNKEY_PROD_SCREENS__