11/12/2560

Dependencies:   mbed

Fork of ColorMbed by Nasrun Hayeeyama

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ColorMbed.h Source File

ColorMbed.h

00001 /*
00002 *************************************
00003 I have some idea to create only three function
00004 display ship;
00005 display dot or bomb;
00006 finally display game interface;
00007 *************************************
00008 */
00009 
00010 #ifndef ColorMbed_H
00011 #define ColorMbed_H
00012 
00013 #include "mbed.h"
00014 
00015 class ColorMbed{
00016 
00017 public:
00018 
00019   void init(); // set white_balance
00020   /*
00021     display_dot can display one dot on dot matrix
00022     parameter :
00023       row : int (1,2,3,...,8)
00024       column : int (1,2,3,...,8)
00025       color : {B,G,R}
00026   */
00027   void display_dot(int row,int column,uint8_t *color);
00028   /*
00029     display_ship 1 to 8 such as
00030       ship 1 is 4 chanal on dot matrix
00031       ship 2 is 3 chanal on dot matrix
00032       2 : ship 3 is 2 chanal on dot matrix
00033       4 : ship 4 is 1 chanal on dot matrix
00034       fix rgb !!!
00035     parameter :
00036       type : int (ship 1..2.3.4)
00037       row : int (1,2,3,4,...,8)
00038       column : int (1,2,3,4,...,8)
00039   */
00040   void display_ship(int row,int column,int type,uint8_t *color);
00041 
00042   void display_pic(uint8_t *pic,uint8_t *color);
00043   /*
00044     display picture from hexa code color in this function is
00045     only color and blank
00046   */
00047 
00048 
00049 
00050 private :
00051 
00052   int _power(int number , int power); // power number
00053 };
00054 
00055 
00056 #endif