Shield¶
-
group
group_board_libs_shield
Basic set of APIs for interacting with the CY8CKIT-028-TFT shield board.
This provides pin definitions and initialization code for the shield. Initialization of the shield configures the internal peripherals to allow them to be used.
Functions
-
cy_rslt_t
cy8ckit_028_tft_init
(cyhal_i2c_t *i2c_inst, cyhal_adc_t *adc_inst, cyhal_pdm_pcm_cfg_t *pdm_pcm_cfg, cyhal_clock_t *audio_clock_inst)¶ Initialize the shield board and all peripherals contained on it.
note
This will reserve all CY8CKIT_028_TFT_PIN_DISPLAY pins for the display.
- Parameters
i2c_inst – [in] An optional I2C instance to use for communicating with the motion sensor on the shield. If NULL, a new instance will be allocated using the CY8CKIT_028_TFT_PIN_IMU_I2C_SCL & CY8CKIT_028_TFT_PIN_IMU_I2C_SDA pins.
adc_inst – [in] An optional adc instance to be used with the light sensor. If NULL, a new instance will be allocated.
pdm_pcm_cfg – [in] The configuration for the PDM object used with the microphone. . If NULL, the PDM object will not be initialized.
audio_clock_inst – [in] The audio clock used with the microphone. . If NULL, the PDM object will not be initialized.
- Returns
CY_RSLT_SUCCESS if properly initialized, else an error indicating what went wrong.
-
mtb_light_sensor_t *
cy8ckit_028_tft_get_light_sensor
(void)¶ Gives the user access to the light sensor object.
- Returns
A reference to the light sensor object on this shield.
-
mtb_bmi160_t *
cy8ckit_028_tft_get_motion_sensor
(void)¶ Gives the user access to the motion sensor object.
- Returns
A reference to the motion sensor object on this shield.
-
cyhal_pdm_pcm_t *
cy8ckit_028_tft_get_pdm
(void)¶ Gives the user access to the PDM object used with the microphone.
- Returns
A reference to the PDM microphone object on this shield.
-
void
cy8ckit_028_tft_free
(void)¶ Frees up any resources allocated as part of cy8ckit_028_tft_init().
-
cy_rslt_t