sota

Dependencies:   mbed

Fork of newdot by SGMP Coperations

Committer:
sotter
Date:
Tue Dec 12 21:07:36 2017 +0000
Revision:
3:d8133244484f
Parent:
1:be91a16b48ea
hhhhh

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dragondrunk 0:6e7a6e71dad3 1 /*
dragondrunk 0:6e7a6e71dad3 2 *************************************
dragondrunk 0:6e7a6e71dad3 3 I have some idea to create only three function
dragondrunk 0:6e7a6e71dad3 4 display ship;
dragondrunk 0:6e7a6e71dad3 5 display dot or bomb;
dragondrunk 0:6e7a6e71dad3 6 finally display game interface;
dragondrunk 0:6e7a6e71dad3 7 *************************************
dragondrunk 0:6e7a6e71dad3 8 */
dragondrunk 0:6e7a6e71dad3 9
dragondrunk 0:6e7a6e71dad3 10 #ifndef ColorMbed_H
dragondrunk 0:6e7a6e71dad3 11 #define ColorMbed_H
dragondrunk 0:6e7a6e71dad3 12
dragondrunk 0:6e7a6e71dad3 13 #include "mbed.h"
dragondrunk 0:6e7a6e71dad3 14
dragondrunk 0:6e7a6e71dad3 15 class ColorMbed{
dragondrunk 0:6e7a6e71dad3 16
dragondrunk 0:6e7a6e71dad3 17 public:
dragondrunk 0:6e7a6e71dad3 18
dragondrunk 0:6e7a6e71dad3 19 void init(); // set white_balance
dragondrunk 0:6e7a6e71dad3 20 /*
dragondrunk 0:6e7a6e71dad3 21 display_dot can display one dot on dot matrix
dragondrunk 0:6e7a6e71dad3 22 parameter :
dragondrunk 0:6e7a6e71dad3 23 row : int (1,2,3,...,8)
dragondrunk 0:6e7a6e71dad3 24 column : int (1,2,3,...,8)
dragondrunk 0:6e7a6e71dad3 25 color : {B,G,R}
dragondrunk 0:6e7a6e71dad3 26 */
dragondrunk 0:6e7a6e71dad3 27 void display_dot(int row,int column,uint8_t *color);
dragondrunk 0:6e7a6e71dad3 28 /*
dragondrunk 0:6e7a6e71dad3 29 display_ship 1 to 8 such as
dragondrunk 0:6e7a6e71dad3 30 ship 1 is 4 chanal on dot matrix
dragondrunk 0:6e7a6e71dad3 31 ship 2 is 3 chanal on dot matrix
dragondrunk 0:6e7a6e71dad3 32 2 : ship 3 is 2 chanal on dot matrix
dragondrunk 0:6e7a6e71dad3 33 4 : ship 4 is 1 chanal on dot matrix
dragondrunk 0:6e7a6e71dad3 34 fix rgb !!!
dragondrunk 0:6e7a6e71dad3 35 parameter :
dragondrunk 0:6e7a6e71dad3 36 type : int (ship 1..2.3.4)
dragondrunk 0:6e7a6e71dad3 37 row : int (1,2,3,4,...,8)
dragondrunk 0:6e7a6e71dad3 38 column : int (1,2,3,4,...,8)
dragondrunk 0:6e7a6e71dad3 39 */
dragondrunk 0:6e7a6e71dad3 40 void display_ship(int row,int column,int type,uint8_t *color);
dragondrunk 0:6e7a6e71dad3 41
dragondrunk 0:6e7a6e71dad3 42 void display_pic(uint8_t *pic,uint8_t *color);
sotter 1:be91a16b48ea 43
dragondrunk 0:6e7a6e71dad3 44 /*
dragondrunk 0:6e7a6e71dad3 45 display picture from hexa code color in this function is
dragondrunk 0:6e7a6e71dad3 46 only color and blank
dragondrunk 0:6e7a6e71dad3 47 */
dragondrunk 0:6e7a6e71dad3 48
dragondrunk 0:6e7a6e71dad3 49
dragondrunk 0:6e7a6e71dad3 50
dragondrunk 0:6e7a6e71dad3 51 private :
dragondrunk 0:6e7a6e71dad3 52
dragondrunk 0:6e7a6e71dad3 53 int _power(int number , int power); // power number
dragondrunk 0:6e7a6e71dad3 54 };
dragondrunk 0:6e7a6e71dad3 55
dragondrunk 0:6e7a6e71dad3 56
dragondrunk 0:6e7a6e71dad3 57 #endif