Jirat

Dependencies:   mbed

Fork of project by Nasrun Hayeeyama

ColorMbed.h

Committer:
gunpuen2
Date:
2016-12-04
Revision:
23:66a401850f2e
Parent:
22:5bc894988f11

File content as of revision 23:66a401850f2e:

/*
*************************************
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,int *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,int *color);

  void display_pic(int *pic,int *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