Make sure docs are updated / settings_md (push) Canceled after 0s
Build firmware / test (push) Canceled after 0s
Build firmware / build-SITL-Windows (push) Canceled after 0s
Build firmware / build-SITL-Mac (push) Canceled after 0s
Build firmware / build-SITL-Linux (push) Canceled after 0s
Build firmware / build-SITL-Linux-arm64 (push) Canceled after 0s
Build firmware / upload-artifacts (push) Canceled after 0s
Build firmware / build-single-target (push) Canceled after 0s
Build firmware / build (9) (push) Canceled after 0s
Build firmware / build (8) (push) Canceled after 0s
Build firmware / build (7) (push) Canceled after 0s
Build firmware / build (6) (push) Canceled after 0s
Build firmware / build (5) (push) Canceled after 0s
Build firmware / build (4) (push) Canceled after 0s
Build firmware / build (3) (push) Canceled after 0s
Build firmware / build (2) (push) Canceled after 0s
Build firmware / build (14) (push) Canceled after 0s
Build firmware / build (13) (push) Canceled after 0s
Build firmware / build (12) (push) Canceled after 0s
Build firmware / build (11) (push) Canceled after 0s
Build firmware / build (10) (push) Canceled after 0s
Build firmware / build (1) (push) Canceled after 0s
Build firmware / build (0) (push) Canceled after 0s
Build firmware / detect (push) Canceled after 0s
Build pre-release / build (push) Canceled after 0s
Build pre-release / Release (push) Canceled after 0s
105 lines
2.5 KiB
C
105 lines
2.5 KiB
C
/**
|
|
******************************************************************************
|
|
* @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****/
|