sota

Dependencies:   mbed

Fork of newdot by SGMP Coperations

ColorMbed.h

Committer:
dragondrunk
Date:
2016-12-03
Revision:
0:6e7a6e71dad3
Child:
1:be91a16b48ea

File content as of revision 0:6e7a6e71dad3:

/*
*************************************
I have some idea to create only three function
display ship;
display dot or bomb;
finally display game interface;
*************************************
*/

#ifndef ColorMbed_H
#define ColorMbed_H

#include "mbed.h"

class ColorMbed{

public:

  void init(); // set white_balance
  /*
    display_dot can display one dot on dot matrix
    parameter :
      row : int (1,2,3,...,8)
      column : int (1,2,3,...,8)
      color : {B,G,R}
  */
  void display_dot(int row,int column,uint8_t *color);
  /*
    display_ship 1 to 8 such as
      ship 1 is 4 chanal on dot matrix
      ship 2 is 3 chanal on dot matrix
      2 : ship 3 is 2 chanal on dot matrix
      4 : ship 4 is 1 chanal on dot matrix
      fix rgb !!!
    parameter :
      type : int (ship 1..2.3.4)
      row : int (1,2,3,4,...,8)
      column : int (1,2,3,4,...,8)
  */
  void display_ship(int row,int column,int type,uint8_t *color);

  void display_pic(uint8_t *pic,uint8_t *color);
  /*
    display picture from hexa code color in this function is
    only color and blank
  */



private :

  int _power(int number , int power); // power number
};


#endif