📄 lh7a400_evb_ssp_frame_driver.c
字号:
/**********************************************************************
* $Workfile: lh7a400_evb_ssp_frame_driver.c $
* $Revision: 1.4 $
* $Author: FergisJ $
* $Date: Aug 28 2002 08:48:58 $
*
* Project: LH79520 and eval board test
*
* Description:
* This file contains driver support for the Synchronous
* Serial Port (SSP) frame control logic on the LH7A400 evb.
*
* Functions provided are:
* lh7a400_evb_ssp_frame_expansion()
* lh7a400_evb_ssp_frame_eeprom()
* lh7a400_evb_ssp_frame_touchscreen()
*
* References:
*
* Revision History:
* $Log: //smaicnt2/pvcs/VM/CHIPS/archives/LH7A400/SSP/Drivers/lh7a400_evb_ssp_frame_driver.c-arc $
*
* Rev 1.4 Aug 28 2002 08:48:58 FergisJ
* For EVB Rev.02: added LH7A400_EVB_SSP_K3_GPIO definition. Updated useage of LH7A400_EVB_SSP_K1_GPIO in eeprom() and touchscreen() functions.
*
* Rev 1.3 Aug 21 2002 16:30:28 FergisJ
* Updated LH7A400_EVB_SSP_NTOUCHEN_EEEN #define for Rev.02 EVB
*
* Rev 1.2 Nov 20 2001 11:31:08 KovitzP
* Added block function comments
*
* Rev 1.1 Nov 14 2001 09:01:44 KovitzP
* Modified include hierarchy
*
* Rev 1.0 Nov 12 2001 13:32:08 KovitzP
* Initial revision.
*
*
* COPYRIGHT (C) 2001 SHARP MICROELECTRONICS OF THE AMERICAS, INC.
* CAMAS, WA
*********************************************************************/
#include "LH7A400_evb_ssp_frame_driver.h"
/* definitions for Port-A signals as of EVB Rev.02 */
#define LH7A400_EVB_SSP_K3_GPIO _BIT(3)
#define LH7A400_EVB_SSP_NTOUCHEN_EEEN _BIT(2)
#define LH7A400_EVB_SSP_K1_GPIO _BIT(1)
/**********************************************************************
*
* Function: lh7a400_evb_ssp_frame_expansion
*
* Purpose:
* set up logic on the evaluation board so that when the LH7A400 SSP
* asserts SSPFRM, neither the EEPROM chip select nor the touchscreen
* chip select are asserted.
*
* Processing:
* This function programs the appropriate GPIO ports.
*
* Parameters: None
*
* Outputs: None
*
* Returns: Nothing
*
* Notes:
* On the first revision of the EVB, this function has the same
* effect as the the lh7a400_evb_ssp_frame_eeprom.
*
**********************************************************************/
void lh7a400_evb_ssp_frame_expansion(void)
{
GPIO->padr |= LH7A400_EVB_SSP_NTOUCHEN_EEEN;
GPIO->padr &= ~LH7A400_EVB_SSP_K1_GPIO;
GPIO->paddr |= LH7A400_EVB_SSP_NTOUCHEN_EEEN |
LH7A400_EVB_SSP_K1_GPIO;
}
/**********************************************************************
*
* Function: lh7a400_evb_ssp_frame_eeprom
*
* Purpose:
* set up logic on the evaluation board so that when the LH7A400 SSP
* asserts SSPFRM, the EEPROM chip select is asserted
*
* Processing:
* This function programs the appropriate GPIO ports.
*
* Parameters: None
*
* Outputs: None
*
* Returns: Nothing
*
* Notes: None
*
**********************************************************************/
void lh7a400_evb_ssp_frame_eeprom(void)
{
GPIO->padr |= LH7A400_EVB_SSP_NTOUCHEN_EEEN;
GPIO->padr &= (~LH7A400_EVB_SSP_K3_GPIO);
GPIO->paddr |= LH7A400_EVB_SSP_NTOUCHEN_EEEN |
LH7A400_EVB_SSP_K3_GPIO;
}
/**********************************************************************
*
* Function: lh7a400_evb_ssp_frame_touchscreen
*
* Purpose:
* set up logic on the evaluation board so that when the LH7A400 SSP
* asserts SSPFRM, the touchscreen controller chip select is asserted
*
* Processing:
* This function programs the appropriate GPIO ports.
*
* Parameters: None
*
* Outputs: None
*
* Returns: Nothing
*
* Notes: None
*
**********************************************************************/
void lh7a400_evb_ssp_frame_touchscreen(void)
{
GPIO->padr &= ~(LH7A400_EVB_SSP_NTOUCHEN_EEEN);
GPIO->paddr |= LH7A400_EVB_SSP_NTOUCHEN_EEEN;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -