CANSAT_CAMERA
Dependents: CANSAT_COMBINED CANSAT_CAMERA_servo CANSAT_CAMERA2
Fork of Camera_LS_Y201 by
Camera_LS_Y201 Class Reference
Camera. More...
#include <Camera_LS_Y201.h>
Public Types | |
enum | ErrorCode |
Error code. More... | |
enum | ImageSize { ImageSize160x120, ImageSize320x280, ImageSize640x480 } |
Image size. More... | |
Public Member Functions | |
Camera_LS_Y201 (PinName tx, PinName rx) | |
Create. | |
~Camera_LS_Y201 () | |
Dispose. | |
ErrorCode | reset () |
Reset module. | |
ErrorCode | setImageSize (ImageSize is) |
Set image size. | |
ErrorCode | takePicture () |
Take picture. | |
ErrorCode | readJpegFileSize (int *fileSize) |
Read jpeg file size. | |
ErrorCode | readJpegFileContent (void(*func)(int done, int total, uint8_t *buf, size_t siz)) |
Read jpeg file content. | |
ErrorCode | stopTakingPictures () |
Stop taking pictures. | |
bool | sendBytes (uint8_t *buf, size_t len, int timeout_us) |
Send bytes to camera module. | |
bool | recvBytes (uint8_t *buf, size_t len, int timeout_us) |
Receive bytes from camera module. |
Detailed Description
Camera.
Definition at line 38 of file Camera_LS_Y201.h.
Member Enumeration Documentation
enum ErrorCode |
Error code.
Definition at line 57 of file Camera_LS_Y201.h.
enum ImageSize |
Image size.
Definition at line 69 of file Camera_LS_Y201.h.
Constructor & Destructor Documentation
Camera_LS_Y201 | ( | PinName | tx, |
PinName | rx | ||
) |
Create.
============================================================================= LS-Y201 device driver class (Version 0.0.1) Reference documents: LinkSprite JPEG Color Camera Serial UART Interface January 2010 ============================================================================= Copyright (c) 2010 Shinichiro Nakamura (CuBeatSystems)
- Parameters:
-
tx Transmitter. rx Receiver.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ============================================================================= Create.
- Parameters:
-
tx Transmitter. rx Receiver.
Definition at line 37 of file Camera_LS_Y201.cpp.
~Camera_LS_Y201 | ( | ) |
Dispose.
Definition at line 65 of file Camera_LS_Y201.cpp.
Member Function Documentation
Camera_LS_Y201::ErrorCode readJpegFileContent | ( | void(*)(int done, int total, uint8_t *buf, size_t siz) | func ) |
Read jpeg file content.
- Parameters:
-
func A pointer to a call back function.
- Returns:
- Error code.
Definition at line 240 of file Camera_LS_Y201.cpp.
Camera_LS_Y201::ErrorCode readJpegFileSize | ( | int * | fileSize ) |
Read jpeg file size.
- Parameters:
-
fileSize File size.
- Returns:
- Error code.
Definition at line 202 of file Camera_LS_Y201.cpp.
bool recvBytes | ( | uint8_t * | buf, |
size_t | len, | ||
int | timeout_us | ||
) |
Receive bytes from camera module.
- Parameters:
-
buf Pointer to the data buffer. len Length of the data buffer.
- Returns:
- True if the data received.
Definition at line 441 of file Camera_LS_Y201.cpp.
Camera_LS_Y201::ErrorCode reset | ( | ) |
bool sendBytes | ( | uint8_t * | buf, |
size_t | len, | ||
int | timeout_us | ||
) |
Send bytes to camera module.
- Parameters:
-
buf Pointer to the data buffer. len Length of the data buffer.
- Returns:
- True if the data sended.
Definition at line 418 of file Camera_LS_Y201.cpp.
Camera_LS_Y201::ErrorCode setImageSize | ( | ImageSize | is ) |
Set image size.
- Parameters:
-
is Image size.
- Returns:
- Error code.
Definition at line 114 of file Camera_LS_Y201.cpp.
Camera_LS_Y201::ErrorCode stopTakingPictures | ( | ) |
Camera_LS_Y201::ErrorCode takePicture | ( | ) |
Generated on Tue Jul 12 2022 13:49:23 by 1.7.2