Shield Library (CY8CKIT-028-EPD)
Shield

General Description

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().
 

Macro Definition Documentation

◆ CY8CKIT_028_EPD_THERM_B_CONST

#define CY8CKIT_028_EPD_THERM_B_CONST   (float)(3380)

Beta constant of the (NCP18XH103F03RB) thermistor (3380 Kelvin).See the thermistor datasheet for more details.

Function Documentation

◆ cy8ckit_028_epd_init()

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.

Parameters
[in]i2c_instAn 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_instAn 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_instAn optional ADC instance used for reading the thermistor. If NULL, a new instance will be allocated.
[in]pdm_pcm_cfgThe configuration for the PDM object used with the microphone. If NULL, the PDM object will not be initialized.
[in]audio_clock_instThe 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.

◆ cy8ckit_028_epd_get_thermistor()

mtb_thermistor_ntc_gpio_t* cy8ckit_028_epd_get_thermistor ( void  )

Gives the user access to the thermistor object.

Returns
A reference to the thermistor object on this shield.

◆ cy8ckit_028_epd_get_thermistor_cfg()

mtb_thermistor_ntc_gpio_cfg_t* cy8ckit_028_epd_get_thermistor_cfg ( void  )

Gives the user access to the thermistor config object.

Returns
A reference to the thermistor configuration.

◆ cy8ckit_028_epd_get_motion_sensor()

mtb_bmi160_t* cy8ckit_028_epd_get_motion_sensor ( void  )

Gives the user access to the motion sensor object.

Returns
A reference to the motion sensor object on this shield.

◆ cy8ckit_028_epd_get_previous_frame()

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.

Returns
A reference to the previous display frame.

◆ cy8ckit_028_epd_get_current_frame()

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.

Returns
A reference to the current display frame.

◆ cy8ckit_028_epd_get_pdm()

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.

Returns
A reference to the PDM microphone object on this shield.