/
jpeg_enc_types.h
executable file
·69 lines (58 loc) · 2.33 KB
/
jpeg_enc_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// Copyright 2020-2021 Beken
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <common/bk_include.h>
#include <driver/hal/hal_jpeg_types.h>
#ifdef __cplusplus
extern "C" {
#endif
/* @brief Overview about this API header
*
*/
/**
* @brief JPEGENC APIs Version 1.0
* @{
*/
#define Y_PIXEL_272 (34) /**< image resolution for hight: Y * 8 = 272 */
#define Y_PIXEL_320 (40) /**< image resolution for hight: Y * 8 = 320 */
#define X_PIXEL_480 (60) /**< image resolution for width: X * 8 = 480 */
#define Y_PIXEL_480 (60) /**< image resolution for hight: Y * 8 = 480 */
#define X_PIXEL_640 (80) /**< image resolution for hight: X * 8 = 640 */
#define Y_PIXEL_240 (30) /**< image resolution for hight: Y * 8 = 240 */
#define X_PIXEL_320 (40) /**< image resolution for hight: X * 8 = 320 */
#define Y_PIXEL_600 (75) /**< image resolution for hight: Y * 8 = 600 */
#define X_PIXEL_800 (100) /**< image resolution for hight: X * 8 = 800 */
#define Y_PIXEL_720 (90) /**< image resolution for hight: Y * 8 = 720 */
#define X_PIXEL_1280 (160) /**< image resolution for hight: X * 8 = 1280 */
#define X_PIXEL_1600 (200) /**< image resolution for hight: X * 8 = 1600 */
#define Y_PIXEL_1200 (150) /**< image resolution for hight: Y * 8 = 1200 */
typedef enum {
JPEG_GPIO_CLK = 0, /**< enable jpeg mclk and pclk gpio function */
JPEG_GPIO_DATA, /**< enable jpeg vsync/hsync/D0-D7 gpio function */
JPEG_GPIO_HSYNC_DATA, /**< enable jpeg hsync/D0-D7 gpio function */
JPEG_GPIO_ALL, /**< enable all jpeg gpio function */
}jpeg_gpio_mode_t;
/**
* @brief jpeg isr callback relay jpeg driver
*
* @param id: only 0 useful, set 0 default
* @param param: NULL default
*/
typedef void (*jpeg_isr_t)(jpeg_unit_t id, void *param);
/**
* @}
*/
#ifdef __cplusplus
}
#endif