This is an digital video camera program using NKK\'s oLED swtich and 4D Systems\' uCam serial camera. It takes image from the uCam and displays on the IS-C15 switch. Some image processing demos are included. This program uses FatFileSytem, SDFileSystem, and TextLCD library. See http://www.youtube.com/watch?v=fqHTaCRHyQs for how it works. CQ出版社の「mbed/ARM活用事例」第10章シリアル接続カメラと有機ELディスプレイ内蔵スイッチで作るmbedディジタル・カメラの作例です。動作の様子は http://www.youtube.com/watch?v=fqHTaCRHyQs で見れます。

Dependencies:   TextLCD mbed SDFileSystem

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers isc15.h Source File

isc15.h

00001 /* mbed NKK IS-C15/C01 oLED switch library
00002  * Copyright (c) 2011, Noriaki Mitsunaga
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a copy
00005  * of this software and associated documentation files (the "Software"), to deal
00006  * in the Software without restriction, including without limitation the rights
00007  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00008  * copies of the Software, and to permit persons to whom the Software is
00009  * furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included in
00012  * all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
00017  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
00019  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
00020  * THE SOFTWARE.
00021  */
00022 #ifndef __ISC15_H__
00023 #define __ISC15_H__
00024 
00025 #include "mbed.h"
00026 
00027 #define ISC15_DEVICE_ISC01 0
00028 #define ISC15_DEVICE_ISC15 1
00029 
00030 #define ISC15_DSPMODE_256 0
00031 #define ISC15_DSPMODE_64K 1
00032 
00033 #define ISC15_WIDTH 64
00034 #define ISC15_HEIGHT 48
00035 
00036 class ISC15 {
00037 public:
00038     ISC15( PinName cs, PinName reset, PinName dc, PinName vcc )
00039             : is_cs(cs), is_reset(reset), is_dc(dc), is_vcc(vcc) {
00040         DevType = 1;
00041         spi = NULL;
00042     }
00043     void    Cls() {
00044         Fill(0);
00045     };
00046     void    Disp( int Mode, const unsigned char *dat );
00047     void    Fill( unsigned char c );
00048     void    Init( int DeviceType, SPI *s );
00049 
00050 private:
00051     DigitalOut is_cs, is_reset, is_dc, is_vcc;
00052     int DevType; // 0:ISC01, 1:ISC15
00053     SPI *spi;
00054 
00055     void    AdrInit( int DevType );
00056     void    DspMode( int DspMode_ );
00057     void    Send( const unsigned char *p, int len );
00058     void    SendCommand( const unsigned char *com );
00059     void    SendData( const unsigned char *dat, int len );
00060 };
00061 #endif