-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathst7735_reg.c
104 lines (90 loc) · 2.49 KB
/
st7735_reg.c
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/**
******************************************************************************
* @file st7735_reg.c
* @author MCD Application Team
* @brief This file includes the LCD driver for st7735 LCD.
******************************************************************************
* @attention
*
* <h2><center>© Copyright (c) 2018 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "st7735_reg.h"
/** @addtogroup BSP
* @{
*/
/** @addtogroup Components
* @{
*/
/** @addtogroup ST7735_REG
* @{
*/
/** @addtogroup ST7735_REG_Exported_Functions
* @{
*/
/**
* @brief Read ST7735 register
* @param ctx Component context
* @param reg Register to read
* @param pdata data to read from the register
* @retval Component status
*/
int32_t st7735_read_reg(st7735_ctx_t *ctx, uint8_t reg, uint8_t *pdata)
{
return ctx->ReadReg(ctx->handle, reg, pdata);
}
/**
* @brief Write ST7735 register
* @param ctx Component context
* @param reg Register to write
* @param pdata data to write to the register
* @param length length of data to write to the register
* @retval Component status
*/
int32_t st7735_write_reg(st7735_ctx_t *ctx, uint8_t reg, uint8_t *pdata, uint32_t length)
{
return ctx->WriteReg(ctx->handle, reg, pdata, length);
}
/**
* @brief Send data
* @param ctx Component context
* @param pdata data to write
* @param length length of data to write
* @retval Component status
*/
int32_t st7735_send_data(st7735_ctx_t *ctx, uint8_t *pdata, uint32_t length)
{
return ctx->SendData(ctx->handle, pdata, length);
}
/**
* @brief Recieve data
* @param ctx Component context
* @param pdata data to read
* @param length length of data to read
* @retval Component status
*/
int32_t st7735_recv_data(st7735_ctx_t *ctx, uint8_t *pdata, uint32_t length)
{
return ctx->RecvData(ctx->handle, pdata, length);
}
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/