Basic set of APIs for interacting with the CY8CKIT-028-EPD 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.
Macros | |
#define | CY8CKIT_028_EPD_THERM_R_REF (float)(10000) |
Resistance of the reference resistor. | |
#define | CY8CKIT_028_EPD_THERM_B_CONST (float)(3380) |
Beta constant of the (NCP18XH103F03RB) thermistor (3380 Kelvin).See the thermistor datasheet for more details. More... | |
#define | CY8CKIT_028_EPD_THERM_R_INFINITY (float)(0.1192855) |
Resistance of the thermistor is 10K at 25 degrees C (from datasheet) Therefore R0 = 10000 Ohm, and T0 = 298.15 Kelvin, which gives R_INFINITY = R0 e^(-B_CONSTANT / T0) = 0.1192855. | |
Functions | |
cy_rslt_t | cy8ckit_028_epd_init (cyhal_i2c_t *i2c_inst, cyhal_spi_t *spi_inst, cyhal_adc_t *adc_inst, const cyhal_pdm_pcm_cfg_t *pdm_pcm_cfg, cyhal_clock_t *audio_clock_inst) |
Initialize the shield board and all peripherals contained on it. More... | |
mtb_thermistor_ntc_gpio_t * | cy8ckit_028_epd_get_thermistor (void) |
Gives the user access to the thermistor object. More... | |
mtb_thermistor_ntc_gpio_cfg_t * | cy8ckit_028_epd_get_thermistor_cfg (void) |
Gives the user access to the thermistor config object. More... | |
mtb_bmi160_t * | cy8ckit_028_epd_get_motion_sensor (void) |
Gives the user access to the motion sensor object. More... | |
uint8_t * | cy8ckit_028_epd_get_previous_frame (void) |
Gives the user access to a buffer that is allocated by the shield library and contains the previous eink frame. More... | |
uint8_t * | cy8ckit_028_epd_get_current_frame (void) |
Gives the user access to a buffer that is allocated by the shield library and contains the current eink frame. More... | |
cyhal_pdm_pcm_t * | cy8ckit_028_epd_get_pdm (void) |
Gives the user access to the PDM object used with the microphone. More... | |
void | cy8ckit_028_epd_free (void) |
Frees up any resources allocated as part of cy8ckit_028_epd_init(). | |
#define CY8CKIT_028_EPD_THERM_B_CONST (float)(3380) |
Beta constant of the (NCP18XH103F03RB) thermistor (3380 Kelvin).See the thermistor datasheet for more details.
cy_rslt_t cy8ckit_028_epd_init | ( | cyhal_i2c_t * | i2c_inst, |
cyhal_spi_t * | spi_inst, | ||
cyhal_adc_t * | adc_inst, | ||
const cyhal_pdm_pcm_cfg_t * | pdm_pcm_cfg, | ||
cyhal_clock_t * | audio_clock_inst | ||
) |
Initialize the shield board and all peripherals contained on it.
[in] | i2c_inst | 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 CYBSP_I2C_SCL & CYBSP_I2C_SDA pins. |
[in] | spi_inst | An optional SPI instance to use for communicating with the display on the shield. If NULL, a new instance will be allocated using the CYBSP_D11 (mosi), CYBSP_D12 (miso), CYBSP_D13 (sclk) & CYBSP_D14 (cs) pins. |
[in] | adc_inst | An optional ADC instance used for reading the thermistor. If NULL, a new instance will be allocated. |
[in] | pdm_pcm_cfg | The configuration for the PDM object used with the microphone. If NULL, the PDM object will not be initialized. |
[in] | audio_clock_inst | The audio clock used with the microphone. If NULL, the PDM object will not be initialized. |
mtb_thermistor_ntc_gpio_t* cy8ckit_028_epd_get_thermistor | ( | void | ) |
Gives the user access to the thermistor object.
mtb_thermistor_ntc_gpio_cfg_t* cy8ckit_028_epd_get_thermistor_cfg | ( | void | ) |
Gives the user access to the thermistor config object.
mtb_bmi160_t* cy8ckit_028_epd_get_motion_sensor | ( | void | ) |
Gives the user access to the motion sensor object.
uint8_t* cy8ckit_028_epd_get_previous_frame | ( | void | ) |
Gives the user access to a buffer that is allocated by the shield library and contains the previous eink frame.
The size of this buffer is defined by the display driver's PV_EINK_IMAGE_SIZE variable.
uint8_t* cy8ckit_028_epd_get_current_frame | ( | void | ) |
Gives the user access to a buffer that is allocated by the shield library and contains the current eink frame.
Note: If EMWIN is enabled the allocated memory is instead allocated and owned by the EMWIN library. Either way this function will return a valid pointer to that memory. The size of this buffer is defined by the display driver's PV_EINK_IMAGE_SIZE variable.
cyhal_pdm_pcm_t* cy8ckit_028_epd_get_pdm | ( | void | ) |
Gives the user access to the PDM object used with the microphone.
This will be null if the arguments to setup the PDM interface were not provided.