Adaptation K22F

Dependencies:   mbed

Committer:
singularity
Date:
Tue Dec 16 15:52:17 2014 +0000
Revision:
0:6004a7230f87
Creation k22F

Who changed what in which revision?

UserRevisionLine numberNew contents of line
singularity 0:6004a7230f87 1 #ifndef _CAMERA_H
singularity 0:6004a7230f87 2 #define _CAMERA_H
singularity 0:6004a7230f87 3
singularity 0:6004a7230f87 4 #include "mbed.h"
singularity 0:6004a7230f87 5
singularity 0:6004a7230f87 6 //La periode de clk doit etre dans 0.5us - 200us
singularity 0:6004a7230f87 7 //Le parametre periode passé en paramètre ds le constructeur et le setter corresponds a 1/4 de la période de la CLK!!
singularity 0:6004a7230f87 8
singularity 0:6004a7230f87 9 class Camera
singularity 0:6004a7230f87 10 {
singularity 0:6004a7230f87 11 public:
singularity 0:6004a7230f87 12 Camera(PinName pin_si, PinName pin_clk, PinName pin_ao, int periode_us);
singularity 0:6004a7230f87 13 void capture(unsigned short *valeurs);
singularity 0:6004a7230f87 14 void setPeriod(int periode);
singularity 0:6004a7230f87 15 private:
singularity 0:6004a7230f87 16 int periode;
singularity 0:6004a7230f87 17
singularity 0:6004a7230f87 18 AnalogIn ao;
singularity 0:6004a7230f87 19 DigitalOut clk;
singularity 0:6004a7230f87 20 DigitalOut si;
singularity 0:6004a7230f87 21 };
singularity 0:6004a7230f87 22
singularity 0:6004a7230f87 23 #endif