/* * Copyright 2016, yichip Semiconductor(shenzhen office) * All Rights Reserved. * * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Yichip Semiconductor; * the contents of this file may not be disclosed to third parties, copied * or duplicated in any form, in whole or in part, without the prior * written permission of Yichip Semiconductor. */ /** *@file common.h *@brief common support for application. */ #ifndef YC_DRV_COMMON_H #define YC_DRV_COMMON_H #include #include #include "yc11xx.h" #include "ycdef.h" #ifdef __cplusplus extern "C" { #endif /** *@brief Writing hardware register. *@param reg register. *@param word value. *@return None. */ void HW_REG_16BIT(uint32_t reg, uint16_t word); /** *@brief Reading hardware register. *@param reg register. *@return The register 16-bit value. */ uint16_t HR_REG_16BIT(uint32_t reg); /** *@brief Reading hardware register. *@param reg register. *@return The register 24_bit value. */ uint32_t HR_REG_24BIT(uint32_t reg); void error_handle(); void whileDelay(int delayValue); void whileDelayshort(int delayValue); #ifdef __cplusplus } #endif #endif