USB30开发笔记.docVIP

  1. 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
  2. 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
  3. 3、此文档由网友上传,因疑似侵权的原因,本站不提供该文档下载,只提供部分内容试读。如果您是出版社/作者,看到后可认领文档,您也可以联系本站进行批量认领。
查看更多
USB30开发笔记

20130819 (周一) CyU3PMemSet ((uint8_t *)io_cfg, 0, sizeof(io_cfg)); io_cfg.isDQ32Bit = CyFalse; io_cfg.useUart = CyTrue; io_cfg.useI2C = CyFalse; io_cfg.useI2S = CyFalse; io_cfg.useSpi = CyFalse; io_cfg.lppMode = CY_U3P_IO_MATRIX_LPP_UART_ONLY; /* GPIO 45 is used as input pin. GPIO 21 is also used but cannot * be selected here as it is part of the GPIF IOs (CTL4). Since * this IO is not used, it can be overridden to become a GPIO by * invoking the CyU3PDeviceGpioOverride call. */ io_cfg.gpioSimpleEn[0] = 0; io_cfg.gpioSimpleEn[1] = 0 /* GPIO 45 */ io_cfg.gpioComplexEn[0] = 0; io_cfg.gpioComplexEn[1] = 0; status = CyU3PDeviceConfigureIOMatrix (io_cfg); /* Configure GPIO 45 as input with interrupt enabled for both edges */ gpioConfig.outValue = CyTrue; gpioConfig.inputEn = CyTrue; gpioConfig.driveLowEn = CyFalse; gpioConfig.driveHighEn = CyFalse; gpioConfig.intrMode = CY_U3P_GPIO_INTR_BOTH_EDGE; apiRetStatus = CyU3PGpioSetSimpleConfig(45, gpioConfig); /* Override GPIO 21 as this pin is associated with GPIF Control signal. * The IO cannot be selected as GPIO by CyU3PDeviceConfigureIOMatrix call * as it is part of the GPIF IOs. Override API call must be made with * caution as this will change the functionality of the pin. If the IO * line is used as part of GPIF and is connected to some external device, * then the line will no longer behave as a GPIF IO.. Here CTL4 line is * not used and so it is safe to override. */ apiRetStatus = CyU3PDeviceGpioOverride (21, CyTrue); /* Configure GPIO 21 as output */ gpioConfig.outValue = CyFalse; gpioConfig.driveLowEn = CyTrue; gpioConfig.driveHighEn = CyTrue; gpioConfig.inputEn = CyFalse; gpioConfig.intrMode = CY_U3P_GPIO_NO_INTR; apiRetStatus = CyU3PGpioSetSimpleConfig(21, gpioConfig); /* Callback funtion for the DMA event notification */ void CyFxUartLpDmaCallback (

知传链电子书

文档评论(0)

almm118 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档