Home
last modified time | relevance | path

Searched refs:resource (Results 1 – 25 of 55) sorted by relevance

123

/hal_infineon-3.4.0/mtb-hal-cat1/COMPONENT_PSOC6HAL/source/
Dcyhal_comp_ctb.c114 uint32_t edge_config_val = (0u == obj->resource.channel_num) in _cyhal_comp_ctb_get_enabled_events()
155 Cy_CTB_ClearInterrupt(obj->base_ctb, _cyhal_opamp_convert_sel(obj->resource.channel_num)); in _cyhal_comp_ctb_irq_handler()
167 obj->base_ctb = _cyhal_ctb_base[obj->resource.block_num]; in _cyhal_comp_ctb_init_hw()
168 …cy_rslt_t result = Cy_CTB_OpampInit(obj->base_ctb, _cyhal_opamp_convert_sel(obj->resource.channel_… in _cyhal_comp_ctb_init_hw()
174 …cy_stc_sysint_t irqCfg = { _cyhal_ctb_irq_n[obj->resource.block_num], CYHAL_ISR_PRIORITY_DEFAULT }; in _cyhal_comp_ctb_init_hw()
176 NVIC_EnableIRQ(_cyhal_ctb_irq_n[obj->resource.block_num]); in _cyhal_comp_ctb_init_hw()
177 …_cyhal_comp_ctb_config_structs[(obj->resource.block_num * _CYHAL_OPAMP_PER_CTB) + obj->resource.ch… in _cyhal_comp_ctb_init_hw()
194 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_comp_ctb_init()
205 …result = _cyhal_opamp_init_common(&(obj->resource), CYHAL_COMP_RSLT_ERR_INVALID_PIN, vin_p, vin_m,… in _cyhal_comp_ctb_init()
229 …j->base_ctb, _cyhal_opamp_convert_switch(obj->resource.channel_num), _cyhal_opamp_pin_to_mask(obj-… in _cyhal_comp_ctb_init()
[all …]
Dcyhal_dma.c124 if (cfg->resource->type == CYHAL_RSC_DMA) in cyhal_dma_init_cfg()
131 CY_ASSERT(cfg->resource->type == CYHAL_RSC_DW); in cyhal_dma_init_cfg()
154 if(obj->resource.type == CYHAL_RSC_DMA) in cyhal_dma_free()
162 if(obj->resource.type == CYHAL_RSC_DW) in cyhal_dma_free()
171 cyhal_hwmgr_free(&obj->resource); in cyhal_dma_free()
181 if(obj->resource.type == CYHAL_RSC_DMA) in cyhal_dma_configure()
188 CY_ASSERT(obj->resource.type == CYHAL_RSC_DW); in cyhal_dma_configure()
199 if(obj->resource.type == CYHAL_RSC_DMA) in cyhal_dma_start_transfer()
206 CY_ASSERT(obj->resource.type == CYHAL_RSC_DW); in cyhal_dma_start_transfer()
217 if(obj->resource.type == CYHAL_RSC_DMA) in cyhal_dma_enable()
[all …]
Dcyhal_dma_dmac.c164 return (obj->resource.block_num * CPUSS_DMAC0_CH_NR) + obj->resource.channel_num; in _cyhal_dma_dmac_get_cfg_offset()
382 cyhal_dmac_hw_type* base = _cyhal_dma_dmac_get_base(obj->resource.block_num); in _cyhal_dma_dmac_stage()
386 …cy_rslt_t rslt = Cy_DMAC_Descriptor_Init(base, obj->resource.channel_num, obj->descriptor, GET_RES… in _cyhal_dma_dmac_stage()
392 …if(CY_DMAC_SUCCESS != Cy_DMAC_Channel_Init(base, obj->resource.channel_num, GET_RESOURCE_DATA(&obj… in _cyhal_dma_dmac_stage()
397 Cy_DMAC_Channel_SetInterruptMask(base, obj->resource.channel_num, CY_DMAC_INTR_MASK); in _cyhal_dma_dmac_stage()
405 uint32_t status = Cy_DMAC_Channel_GetInterruptStatus(base, obj->resource.channel_num); in _cyhal_dma_dmac_stage()
410 Cy_DMAC_Channel_ClearInterrupt(base, obj->resource.channel_num, CY_DMAC_INTR_MASK); in _cyhal_dma_dmac_stage()
440 … CYHAL_RSC_DMA, src, dest, _cyhal_dma_dmac_get_src, _cyhal_dma_dmac_get_dest, &obj->resource); in _cyhal_dma_dmac_init()
473 obj->resource = *(cfg->resource); in _cyhal_dma_dmac_init_cfg()
501 cyhal_dmac_hw_type* base = _cyhal_dma_dmac_get_base(obj->resource.block_num); in _cyhal_dma_dmac_free()
[all …]
Dcyhal_dma_dw.c143 …_cyhal_dma_dw_config_structs[obj->resource.block_num * CPUSS_DW0_CH_NR + obj->resource.channel_num… in _cyhal_dma_dw_set_obj()
149 …_cyhal_dma_dw_config_structs[obj->resource.block_num * CPUSS_DW0_CH_NR + obj->resource.channel_num… in _cyhal_dma_dw_free_obj()
215 … if (obj->resource.block_num == 0 && obj->resource.channel_num < CYHAL_DMA_DW0_MAX_CONTIGUOUS_IRQ) in _cyhal_dma_dw_get_irqn()
217 return (IRQn_Type)((uint8_t)cpuss_interrupts_dw0_0_IRQn + obj->resource.channel_num); in _cyhal_dma_dw_get_irqn()
220 else if ((obj->resource.block_num == 0 && obj->resource.channel_num < CPUSS_DW0_CH_NR)) in _cyhal_dma_dw_get_irqn()
222 …)_CYHAL_DMA_GET_CPUSS_IRQN(0, CYHAL_DMA_DW0_MAX_CONTIGUOUS_IRQ) + (obj->resource.channel_num - CYH… in _cyhal_dma_dw_get_irqn()
227 … if (obj->resource.block_num == 1 && obj->resource.channel_num < CYHAL_DMA_DW1_MAX_CONTIGUOUS_IRQ) in _cyhal_dma_dw_get_irqn()
229 return (IRQn_Type)((uint8_t)cpuss_interrupts_dw1_0_IRQn + obj->resource.channel_num); in _cyhal_dma_dw_get_irqn()
232 else if (obj->resource.block_num == 1 && obj->resource.channel_num < CPUSS_DW1_CH_NR) in _cyhal_dma_dw_get_irqn()
234 …)_CYHAL_DMA_GET_CPUSS_IRQN(1, CYHAL_DMA_DW1_MAX_CONTIGUOUS_IRQ) + (obj->resource.channel_num - CYH… in _cyhal_dma_dw_get_irqn()
[all …]
Dcyhal_pwm.c119 …if (period < 1 || period > (uint32_t)((1 << _CYHAL_TCPWM_DATA[obj->tcpwm.resource.block_num].max_c… in cyhal_pwm_set_period_and_compare()
127 Cy_TCPWM_PWM_SetCompare0(obj->tcpwm.base, obj->tcpwm.resource.channel_num, 0u); in cyhal_pwm_set_period_and_compare()
128 Cy_TCPWM_PWM_SetPeriod0(obj->tcpwm.base, obj->tcpwm.resource.channel_num, period - 1u); in cyhal_pwm_set_period_and_compare()
139 …T_TR_PWM_CTRL(obj->tcpwm.base, TCPWM_GRP_CNT_GET_GRP(_CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource)), in cyhal_pwm_set_period_and_compare()
140 _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource)); in cyhal_pwm_set_period_and_compare()
141 …32_t cc1_ignore_mask = (0 == TCPWM_GRP_CNT_GET_GRP(_CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource))) ? in cyhal_pwm_set_period_and_compare()
146 …bool is_center_aligned = (TCPWM_CNT_TR_CTRL2(obj->tcpwm.base, obj->tcpwm.resource.channel_num) == … in cyhal_pwm_set_period_and_compare()
147 …(TCPWM_CNT_TR_CTRL2(obj->tcpwm.base, obj->tcpwm.resource.channel_num) == _CYHAL_PWM_MODE_CNTR_OR_A… in cyhal_pwm_set_period_and_compare()
153 Cy_TCPWM_PWM_SetCompare0(obj->tcpwm.base, obj->tcpwm.resource.channel_num, new_compare_value); in cyhal_pwm_set_period_and_compare()
154 …if (Cy_TCPWM_PWM_GetCounter(obj->tcpwm.base, obj->tcpwm.resource.channel_num) >= new_compare_value) in cyhal_pwm_set_period_and_compare()
[all …]
Dcyhal_opamp.c85 obj->base = _cyhal_ctb_base[obj->resource.block_num]; in _cyhal_opamp_init_hw()
86 …cy_rslt_t result = Cy_CTB_OpampInit(obj->base, _cyhal_opamp_convert_sel(obj->resource.channel_num)… in _cyhal_opamp_init_hw()
105 obj->resource.type = CYHAL_RSC_INVALID; in cyhal_opamp_init()
117 …result = _cyhal_opamp_init_common(&(obj->resource), CYHAL_OPAMP_RSLT_BAD_ARGUMENT, vin_p, vin_m, v… in cyhal_opamp_init()
134 …h(obj->base, _cyhal_opamp_convert_switch(obj->resource.channel_num), _cyhal_opamp_pin_to_mask(obj-… in cyhal_opamp_init()
135 _cyhal_opamp_set_isolation_switch(obj->resource.channel_num, obj->base, true); in cyhal_opamp_init()
150 obj->resource = *cfg->resource; in cyhal_opamp_init_cfg()
169 …Cy_CTB_SetPower(obj->base, _cyhal_opamp_convert_sel(obj->resource.channel_num), power_level, _CYHA… in cyhal_opamp_set_power()
183 …h(obj->base, _cyhal_opamp_convert_switch(obj->resource.channel_num), _cyhal_opamp_pin_to_mask(obj-… in cyhal_opamp_free()
184 _cyhal_opamp_set_isolation_switch(obj->resource.channel_num, obj->base, false); in cyhal_opamp_free()
[all …]
Dcyhal_comp.c90 obj->resource = *cfg->resource; in cyhal_comp_init_cfg()
96 if (CYHAL_RSC_LPCOMP == cfg->resource->type) in cyhal_comp_init_cfg()
103 if (CYHAL_RSC_OPAMP == cfg->resource->type) in cyhal_comp_init_cfg()
116 if(obj->resource.type == CYHAL_RSC_OPAMP) in cyhal_comp_free()
125 if(obj->resource.type == CYHAL_RSC_LPCOMP) in cyhal_comp_free()
138 if(obj->resource.type == CYHAL_RSC_OPAMP) in cyhal_comp_set_power()
145 CY_ASSERT(obj->resource.type == CYHAL_RSC_LPCOMP); in cyhal_comp_set_power()
154 if(obj->resource.type == CYHAL_RSC_OPAMP) in cyhal_comp_configure()
161 CY_ASSERT(obj->resource.type == CYHAL_RSC_LPCOMP); in cyhal_comp_configure()
170 if(obj->resource.type == CYHAL_RSC_OPAMP) in cyhal_comp_read()
[all …]
Dcyhal_crypto_common.c70 cy_rslt_t cyhal_crypto_reserve(CRYPTO_Type** base, cyhal_resource_inst_t *resource, cyhal_crypto_fe… in cyhal_crypto_reserve() argument
78 resource->type = CYHAL_RSC_CRYPTO; in cyhal_crypto_reserve()
79 resource->block_num = (uint8_t)i; in cyhal_crypto_reserve()
80 resource->channel_num = 0; in cyhal_crypto_reserve()
88 result = cyhal_hwmgr_reserve(resource); in cyhal_crypto_reserve()
109 void cyhal_crypto_free(CRYPTO_Type* base, cyhal_resource_inst_t *resource, cyhal_crypto_feature_t f… in cyhal_crypto_free() argument
111 if (_cyhal_crypto_features[resource->block_num][feature] != 0) in cyhal_crypto_free()
113 --_cyhal_crypto_features[resource->block_num][feature]; in cyhal_crypto_free()
117 if (!_cyhal_crypto_enabled(resource->block_num)) in cyhal_crypto_free()
132 cyhal_hwmgr_free(resource); in cyhal_crypto_free()
[all …]
Dcyhal_pdmpcm.c328 uint8_t channel_idx = obj->resource.channel_num; in _cyhal_pdm_pcm_get_paired_channel()
330 if(paired_channel < _cyhal_pdm_num_channels[obj->resource.block_num]) in _cyhal_pdm_pcm_get_paired_channel()
332 …if((false == check_used) || (obj == _cyhal_pdm_pcm_config_structs[obj->resource.block_num][paired_… in _cyhal_pdm_pcm_get_paired_channel()
402 Cy_PDM_PCM_Channel_ClearInterrupt(obj->base, obj->resource.channel_num, interrupt); in _cyhal_pdm_pcm_clear_interrupt()
411 return Cy_PDM_PCM_Channel_GetInterruptMask(obj->base, obj->resource.channel_num); in _cyhal_pdm_pcm_get_interrupt_mask()
420 Cy_PDM_PCM_Channel_SetInterruptMask(obj->base, obj->resource.channel_num, mask); in _cyhal_pdm_pcm_set_interrupt_mask()
429 …PDM_PCM_RX_FIFO_CTL(obj->base, obj->resource.channel_num) = _VAL2FLD(PDM_CH_RX_FIFO_CTL_TRIGGER_LE… in _cyhal_pdm_pcm_set_rx_fifo_level()
433 …PDM_PCM_RX_FIFO_CTL(obj->base, obj->resource.channel_num) = _VAL2FLD(PDM_CH_RX_FIFO_CTL_TRIGGER_LE… in _cyhal_pdm_pcm_set_rx_fifo_level()
499 .src_addr = (uint32_t)(&(obj->base->CH[obj->resource.channel_num].RX_FIFO_RD)), in _cyhal_pdm_pcm_dma_start()
570 … uint32_t irq_status = Cy_PDM_PCM_Channel_GetInterruptStatus(obj->base, obj->resource.channel_num); in _cyhal_pdm_pcm_hw_irq_handler()
[all …]
Dcyhal_comp_lp.c198 Cy_LPComp_ClearInterrupt(obj->base_lpcomp, (uint32_t) (1u << obj->resource.channel_num)); in _cyhal_comp_lp_irq_handler()
211 obj->base_lpcomp = _cyhal_lpcomp_base[obj->resource.block_num]; in _cyhal_comp_lp_init_hw()
212 …cy_rslt_t result = _cyhal_lpcomp_init(obj->base_lpcomp, _CYHAL_COMP_GET_CHANNEL(obj->resource.chan… in _cyhal_comp_lp_init_hw()
216 Cy_LPComp_SetInterruptMask(obj->base_lpcomp, (uint32_t) (1u << obj->resource.channel_num)); in _cyhal_comp_lp_init_hw()
219 _cyhal_lpcomp_enable(obj->base_lpcomp, _CYHAL_COMP_GET_CHANNEL(obj->resource.channel_num)); in _cyhal_comp_lp_init_hw()
221 …_cyhal_comp_lp_config_structs[(obj->resource.block_num * _CYHAL_COMP_PER_LP) + obj->resource.chann… in _cyhal_comp_lp_init_hw()
222 …cy_stc_sysint_t irqCfg = { _cyhal_lp_comp_irq_n[obj->resource.block_num], CYHAL_ISR_PRIORITY_DEFAU… in _cyhal_comp_lp_init_hw()
224 NVIC_EnableIRQ(_cyhal_lp_comp_irq_n[obj->resource.block_num]); in _cyhal_comp_lp_init_hw()
244 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_comp_lp_init()
281 obj->resource = rsc; in _cyhal_comp_lp_init()
[all …]
Dcyhal_timer.c96 cyhal_resource_inst_t *timer = &obj->tcpwm.resource; in _cyhal_timer_init_hw()
125 …result = Cy_TCPWM_Counter_Init(obj->tcpwm.base, _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource), conf… in _cyhal_timer_init_hw()
131 Cy_TCPWM_Counter_Enable(obj->tcpwm.base, _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource)); in _cyhal_timer_init_hw()
146 obj->tcpwm.resource.type = CYHAL_RSC_INVALID; in cyhal_timer_init()
147 cy_rslt_t result = cyhal_hwmgr_allocate(CYHAL_RSC_TCPWM, &obj->tcpwm.resource); in cyhal_timer_init()
164 obj->tcpwm.resource = *cfg->resource; in cyhal_timer_init_cfg()
186 …ld_mask = Cy_TCPWM_GetInterruptMask(obj->tcpwm.base, _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource)); in cyhal_timer_configure()
187 Cy_TCPWM_Counter_DeInit(obj->tcpwm.base, _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource), &config); in cyhal_timer_configure()
188 …lt_t)Cy_TCPWM_Counter_Init(obj->tcpwm.base, _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource), &config); in cyhal_timer_configure()
189 Cy_TCPWM_Counter_Enable(obj->tcpwm.base, _CYHAL_TCPWM_CNT_NUMBER(obj->tcpwm.resource)); in cyhal_timer_configure()
[all …]
Dcyhal_adc_mic.c256 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_adc_config_hw()
260 if(NULL == cfg->resource && NC != pin) in _cyhal_adc_config_hw()
270 obj->resource = inst; in _cyhal_adc_config_hw()
276 if (obj->resource.type == CYHAL_RSC_INVALID) in _cyhal_adc_config_hw()
281 else if(NULL != cfg->resource) in _cyhal_adc_config_hw()
283 obj->resource = *cfg->resource; in _cyhal_adc_config_hw()
293 obj->resource = *cfg->resource; in _cyhal_adc_config_hw()
295 obj->base = _cyhal_adcmic_base[obj->resource.block_num]; in _cyhal_adc_config_hw()
296 pclk = _cyhal_adcmic_clock[obj->resource.block_num]; in _cyhal_adc_config_hw()
303 …(result = _cyhal_utils_allocate_clock(&(obj->clock), &(obj->resource), CYHAL_CLOCK_BLOCK_PERIPHERA… in _cyhal_adc_config_hw()
[all …]
Dcyhal_tcpwm_common.c196 …TATUS_COUNTER_RUNNING & Cy_TCPWM_PWM_GetStatus(obj->base, _CYHAL_TCPWM_CNT_NUMBER(obj->resource)))) in _cyhal_tcpwm_pm_callback()
236 …hal_tcpwm_data_structs[_CYHAL_TCPWM_GET_ARRAY_INDEX(tcpwm->resource.block_num, tcpwm->resource.cha… in _cyhal_tcpwm_init_data()
281 …IRQn_Type irqn = (IRQn_Type)(_CYHAL_TCPWM_DATA[obj->resource.block_num].isr_offset + obj->resource in _cyhal_tcpwm_free()
286 …_cyhal_tcpwm_data_structs[_CYHAL_TCPWM_GET_ARRAY_INDEX(obj->resource.block_num, obj->resource.chan… in _cyhal_tcpwm_free()
307 Cy_TCPWM_Disable_Single(obj->base, _CYHAL_TCPWM_CNT_NUMBER(obj->resource)); in _cyhal_tcpwm_free()
309 Cy_TCPWM_PWM_Disable(obj->base, _CYHAL_TCPWM_CNT_NUMBER(obj->resource)); in _cyhal_tcpwm_free()
314 cyhal_hwmgr_free(&(obj->resource)); in _cyhal_tcpwm_free()
318 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_tcpwm_free()
323 …lk_dst_t pclk = (en_clk_dst_t)(_CYHAL_TCPWM_DATA[obj->resource.block_num].clock_dst + obj->resourc… in _cyhal_tcpwm_free()
332 void _cyhal_tcpwm_register_callback(cyhal_resource_inst_t *resource, cy_israddress callback, void *… in _cyhal_tcpwm_register_callback() argument
[all …]
Dcyhal_ezi2c.c117 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_ezi2c_setup_resources()
137 obj->resource = rsc; in _cyhal_ezi2c_setup_resources()
170 obj->base = _CYHAL_SCB_BASE_ADDRESSES[obj->resource.block_num]; in _cyhal_ezi2c_init_hw()
178 …_cyhal_scb_update_instance_data(obj->resource.block_num, (void*)obj, &_cyhal_ezi2c_pm_callback_ins… in _cyhal_ezi2c_init_hw()
183 …cy_stc_sysint_t irqCfg = { _CYHAL_SCB_IRQ_N[obj->resource.block_num], CYHAL_ISR_PRIORITY_DEFAULT }; in _cyhal_ezi2c_init_hw()
203 NVIC_EnableIRQ(_CYHAL_SCB_IRQ_N[obj->resource.block_num]); in _cyhal_ezi2c_setup_and_enable()
270 if (CYHAL_RSC_INVALID != obj->resource.type) in cyhal_ezi2c_free()
272 _cyhal_scb_update_instance_data(obj->resource.block_num, NULL, NULL); in cyhal_ezi2c_free()
273 IRQn_Type irqn = _CYHAL_SCB_IRQ_N[obj->resource.block_num]; in cyhal_ezi2c_free()
278 cyhal_hwmgr_free(&(obj->resource)); in cyhal_ezi2c_free()
[all …]
Dcyhal_spi.c127 …_cyhal_utils_peri_pclk_disable_divider(_cyhal_scb_get_clock_index(obj->resource.block_num), &(obj-… in _cyhal_spi_int_frequency()
129 uint32_t peri_freq = _cyhal_utils_get_peripheral_clock_frequency(&(obj->resource)); in _cyhal_spi_int_frequency()
144 divider_value = _cyhal_utils_divider_value(&(obj->resource), hz * oversample_value, 0); in _cyhal_spi_int_frequency()
182 …result = _cyhal_utils_peri_pclk_set_divider(_cyhal_scb_get_clock_index(obj->resource.block_num), &… in _cyhal_spi_int_frequency()
186 …_cyhal_utils_peri_pclk_enable_divider(_cyhal_scb_get_clock_index(obj->resource.block_num), &(obj->… in _cyhal_spi_int_frequency()
410 … if (CY_RSLT_SUCCESS == _cyhal_spi_get_ssel_map_idx(ssel, &ssel_map, &found_idx, &(obj->resource))) in _cyhal_spi_ssel_config()
414 … ? _CYHAL_SCB_FIND_MAP_BLOCK(obj->pin_mosi, cyhal_pin_map_scb_spi_s_mosi, &(obj->resource)) in _cyhal_spi_ssel_config()
415 … : _CYHAL_SCB_FIND_MAP_BLOCK(obj->pin_miso, cyhal_pin_map_scb_spi_s_miso, &(obj->resource)); in _cyhal_spi_ssel_config()
459 .resource = NULL, in cyhal_spi_init()
476 obj->dc_configured = (NULL != cfg->resource); in cyhal_spi_init_cfg()
[all …]
Dcyhal_lptimer.c273 obj->resource.type = CYHAL_RSC_INVALID; in cyhal_lptimer_init()
277 cy_rslt_t rslt = cyhal_hwmgr_allocate(CYHAL_RSC_LPTIMER, &(obj->resource)); in cyhal_lptimer_init()
280 obj->base = _CYHAL_LPTIMER_BASE_ADDRESSES[obj->resource.block_num]; in cyhal_lptimer_init()
297 _cyhal_lptimer_config_structs[obj->resource.block_num] = obj; in cyhal_lptimer_init()
302 IRQn_Type irqn = (IRQn_Type) (srss_interrupt_mcwdt_0_IRQn + obj->resource.block_num); in cyhal_lptimer_init()
323 if (CYHAL_RSC_INVALID != obj->resource.type) in cyhal_lptimer_free()
325 IRQn_Type irqn = (IRQn_Type)(srss_interrupt_mcwdt_0_IRQn + obj->resource.block_num); in cyhal_lptimer_free()
328 cyhal_hwmgr_free(&(obj->resource)); in cyhal_lptimer_free()
329 obj->resource.type = CYHAL_RSC_INVALID; in cyhal_lptimer_free()
369 CY_ASSERT(CYHAL_RSC_INVALID != obj->resource.block_num); in cyhal_lptimer_register_callback()
[all …]
Dcyhal_scb_common.c261 …nt32_t block_num = is_i2c ? ((cyhal_i2c_t *)obj)->resource.block_num : ((cyhal_ezi2c_t *)obj)->res… in _cyhal_i2c_set_peri_divider()
380 cy_rslt_t _cyhal_scb_enable_output(cyhal_resource_inst_t resource, cyhal_scb_output_t output, cyhal… in _cyhal_scb_enable_output() argument
391 src_int = (resource.block_num < 3) in _cyhal_scb_enable_output()
392 ? (cyhal_internal_source_t)(_CYHAL_TRIGGER_SCB0_TR_RX_REQ + resource.block_num) in _cyhal_scb_enable_output()
393 : (cyhal_internal_source_t)(_CYHAL_TRIGGER_SCB0_TR_RX_REQ + resource.block_num - 1); in _cyhal_scb_enable_output()
395 src_int = (cyhal_internal_source_t)(_CYHAL_TRIGGER_SCB0_TR_RX_REQ + resource.block_num); in _cyhal_scb_enable_output()
407 src_int = (resource.block_num < 3) in _cyhal_scb_enable_output()
408 ? (cyhal_internal_source_t)(_CYHAL_TRIGGER_SCB0_TR_TX_REQ + resource.block_num) in _cyhal_scb_enable_output()
409 : (cyhal_internal_source_t)(_CYHAL_TRIGGER_SCB0_TR_TX_REQ + resource.block_num - 1); in _cyhal_scb_enable_output()
411 src_int = (cyhal_internal_source_t)(_CYHAL_TRIGGER_SCB0_TR_TX_REQ + resource.block_num); in _cyhal_scb_enable_output()
[all …]
Dcyhal_keyscan.c173 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_keyscan_init_resources()
192 if(CYHAL_RSC_INVALID == obj->resource.type) in _cyhal_keyscan_init_resources()
194 obj->resource.type = CYHAL_RSC_KEYSCAN; in _cyhal_keyscan_init_resources()
195 obj->resource.block_num = column_map->block_num; in _cyhal_keyscan_init_resources()
196 obj->resource.channel_num = 0; in _cyhal_keyscan_init_resources()
197 result = cyhal_hwmgr_reserve(&(obj->resource)); in _cyhal_keyscan_init_resources()
202 else if (obj->resource.block_num != column_map->block_num) in _cyhal_keyscan_init_resources()
240 if (result == CY_RSLT_SUCCESS && (obj->resource.block_num != row_map->block_num)) in _cyhal_keyscan_init_resources()
295 obj->base = _cyhal_keyscan_base[obj->resource.block_num]; in _cyhal_keyscan_init_hw()
366 obj->resource = *cfg->resource; in cyhal_keyscan_init_cfg()
[all …]
Dcyhal_uart.c317 static uint32_t _cyhal_uart_actual_baud(const cyhal_resource_inst_t *resource, uint32_t divider, ui… in _cyhal_uart_actual_baud() argument
319 return _cyhal_utils_get_peripheral_clock_frequency(resource) / (divider * oversample); in _cyhal_uart_actual_baud()
329 static uint8_t _cyhal_uart_best_oversample(const cyhal_resource_inst_t *resource, uint32_t baudrate) in _cyhal_uart_best_oversample() argument
336 uint32_t divider = _cyhal_utils_divider_value(resource, baudrate * i, 0); in _cyhal_uart_best_oversample()
337 …erence = (uint8_t)_cyhal_uart_baud_perdif(baudrate, _cyhal_uart_actual_baud(resource, divider, i)); in _cyhal_uart_best_oversample()
355 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_uart_setup_resources()
411 obj->resource = uart_rsc; in _cyhal_uart_setup_resources()
453 …result = _cyhal_utils_allocate_clock(&(obj->clock), &obj->resource, CYHAL_CLOCK_BLOCK_PERIPHERAL_1… in _cyhal_uart_setup_resources()
466 _cyhal_scb_get_clock_index(obj->resource.block_num), &(obj->clock)); in _cyhal_uart_setup_resources()
474 obj->base = _CYHAL_SCB_BASE_ADDRESSES[obj->resource.block_num]; in _cyhal_uart_init_hw()
[all …]
Dcyhal_trng.c45 return cyhal_crypto_reserve(&(obj->base), &(obj->resource), CYHAL_CRYPTO_TRNG); in cyhal_trng_init()
50 CY_ASSERT(NULL != obj || obj->resource.type != CYHAL_RSC_CRYPTO); in cyhal_trng_free()
51 if (obj->resource.type != CYHAL_RSC_INVALID) in cyhal_trng_free()
53 cyhal_crypto_free(obj->base, &(obj->resource), CYHAL_CRYPTO_TRNG); in cyhal_trng_free()
Dcyhal_crc.c50 return cyhal_crypto_reserve(&(obj->base), &(obj->resource), CYHAL_CRYPTO_CRC); in cyhal_crc_init()
55 CY_ASSERT(NULL != obj || obj->resource.type != CYHAL_RSC_CRYPTO); in cyhal_crc_free()
57 if (obj->resource.type != CYHAL_RSC_INVALID) in cyhal_crc_free()
59 cyhal_crypto_free(obj->base, &(obj->resource), CYHAL_CRYPTO_CRC); in cyhal_crc_free()
Dcyhal_i2c.c156 obj->resource.type = CYHAL_RSC_INVALID; in _cyhal_i2c_init_resources()
176 obj->resource = rsc; in _cyhal_i2c_init_resources()
194 …result = _cyhal_utils_allocate_clock(&(obj->clock), &(obj->resource), CYHAL_CLOCK_BLOCK_PERIPHERAL… in _cyhal_i2c_init_resources()
228 …_cyhal_scb_update_instance_data(obj->resource.block_num, (void*)obj, &_cyhal_i2c_pm_callback_insta… in _cyhal_i2c_init_hw()
239 …cy_stc_sysint_t irqCfg = { _CYHAL_SCB_IRQ_N[obj->resource.block_num], CYHAL_ISR_PRIORITY_DEFAULT }; in _cyhal_i2c_init_hw()
241 NVIC_EnableIRQ(_CYHAL_SCB_IRQ_N[obj->resource.block_num]); in _cyhal_i2c_init_hw()
275 obj->resource = *cfg->resource; in cyhal_i2c_init_cfg()
278 obj->base = _CYHAL_SCB_BASE_ADDRESSES[obj->resource.block_num]; in cyhal_i2c_init_cfg()
294 if (CYHAL_RSC_INVALID != obj->resource.type) in cyhal_i2c_free()
296 _cyhal_scb_update_instance_data(obj->resource.block_num, NULL, NULL); in cyhal_i2c_free()
[all …]
/hal_infineon-3.4.0/mtb-hal-cat1/COMPONENT_PSOC6HAL/include/
Dcyhal_hw_types.h163 cyhal_resource_inst_t resource; member
186 cyhal_resource_inst_t resource; member
236 const cyhal_resource_inst_t* resource; member
326 cyhal_resource_inst_t resource; member
375 const cyhal_resource_inst_t* resource; member
412 cyhal_resource_inst_t resource; member
449 const cyhal_resource_inst_t* resource; member
496 cyhal_resource_inst_t resource; member
527 const cyhal_resource_inst_t* resource; member
554 cyhal_resource_inst_t resource; member
[all …]
Dcyhal_tcpwm_common.h51 #define _CYHAL_TCPWM_CNT_NUMBER(resource) ((resource).channel_num) argument
54 … #define _CYHAL_TCPWM_CNT_NUMBER(resource) (((resource).block_num << 8) | (resource).channel_num)
57 #define _CYHAL_TCPWM_CNT_NUMBER(resource) ((resource).channel_num)
183 void _cyhal_tcpwm_register_callback(cyhal_resource_inst_t *resource, cy_israddress callback, void *…
193 void _cyhal_tcpwm_enable_event(TCPWM_Type *type, cyhal_resource_inst_t *resource, uint32_t event, u…
/hal_infineon-3.4.0/wifi-host-driver/WiFi_Host_Driver/resources/resource_imp/
Dwhd_resources.c60 uint32_t host_platform_resource_size(whd_driver_t whd_drv, whd_resource_type_t resource, uint32_t *…
65 resource_result_t resource_read(const resource_hnd_t *resource, uint32_t offset, uint32_t maxsize, …
92 resource_result_t resource_read(const resource_hnd_t *resource, uint32_t offset, uint32_t maxsize, … in resource_read() argument
95 if (offset > resource->size) in resource_read()
100 *size = MIN(maxsize, resource->size - offset); in resource_read()
102 if (resource->location == RESOURCE_IN_MEMORY) in resource_read()
104 memcpy(buffer, &resource->val.mem.data[offset], *size); in resource_read()
107 else if (resource->location == RESOURCE_IN_EXTERNAL_STORAGE) in resource_read()
109 return platform_read_external_resource(resource, offset, maxsize, size, buffer); in resource_read()
119 … wiced_filesystem_file_open (&resource_fs_handle, &file_handle, resource->val.fs.filename, in resource_read()
[all …]

123