| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- /*
- * Copyright (c) 2006-2024 RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2022-07-28 rtthread qiu first version
- */
- #ifndef __DRV__DAC_H__
- #define __DRV__DAC_H__
- #include "rtconfig.h"
- #include "cycfg.h"
- #include <rtthread.h>
- #include "cy_csdidac.h"
- #include "cycfg_peripherals.h"
- static const cy_stc_csdidac_pin_t CSDIDAC_csdidac_a_pin =
- {
- .ioPcPtr = GPIO_PRT10,
- .pin = 0u,
- };
- static const cy_stc_csdidac_pin_t CSDIDAC_csdidac_b_pin =
- {
- .ioPcPtr = GPIO_PRT10,
- .pin = 0u,
- };
- const cy_stc_csdidac_config_t CSDIDAC_csdidac_config =
- {
- .base = CSD0,
- .csdCxtPtr = &cy_csd_0_context,
- .configA = CY_CSDIDAC_GPIO,
- .configB = CY_CSDIDAC_GPIO,
- .ptrPinA = (const cy_stc_csdidac_pin_t *)&CSDIDAC_csdidac_a_pin,
- .ptrPinB = (const cy_stc_csdidac_pin_t *)&CSDIDAC_csdidac_b_pin,
- .cpuClk = 100000000u,
- .csdInitTime = 25u,
- };
- #ifdef BSP_USING_DAC1
- #ifndef DAC1_CONFIG
- #define DAC1_CONFIG \
- { \
- .name = "dac1", \
- }
- #endif /* DAC1_CONFIG */
- #endif /*BSP_USING_DAC2*/
- #ifdef BSP_USING_DAC2
- #ifndef DAC2_CONFIG
- #define DAC2_CONFIG \
- { \
- .name = "dac2", \
- }
- #endif /* DAC2_CONFIG */
- #endif /*BSP_USING_DAC2*/
- #endif /*__DRV__DAC_H__*/
|