Library to control the EM027BS013 ePaper display from Pervasive Display.
Dependents: app_epaper_EM027BS013_LPC1549 lpc4088_ebb_epaper EaEpaper_EM027BS013 app_epaper_EM027BS013 ... more
EPD_hardware_driver.cpp File Reference
The initialization and configuration of COG hardware driver. More...
Go to the source code of this file.
Functions | |
void | SysTick_Handler (void) |
Interrupt Service Routine for system tick counter. | |
static void | initialize_EPD_timer (void) |
Set up EPD Timer for 1 mSec interrupts. | |
void | start_EPD_timer (void) |
Start Timer. | |
void | stop_EPD_timer (void) |
Stop Timer. | |
uint32_t | get_current_time_tick (void) |
Get current Timer after starting a new one. | |
void | set_current_time_tick (uint32_t count) |
Set current Timer after starting a new one. | |
void | delay_ms (unsigned int ms) |
Interrupt Service Routine for Timer A0. | |
void | sys_delay_ms (unsigned int ms) |
Delay mini-seconds. | |
void | PWM_start_toggle (void) |
The PWM signal starts toggling. | |
void | PWM_stop_toggle (void) |
The PWM signal stops toggling. | |
void | PWM_run (uint16_t ms) |
PWM toggling. | |
void | epd_spi_init (void) |
Configure SPI. | |
void | epd_spi_attach (void) |
Initialize SPI. | |
void | epd_spi_detach (void) |
Disable SPI and change to GPIO. | |
void | epd_spi_write (unsigned char Data) |
SPI synchronous write. | |
uint8_t | epd_spi_read (unsigned char RDATA) |
SPI synchronous read. | |
uint8_t | epd_spi_write_ex (unsigned char Data) |
Send data to SPI with time out feature. | |
uint8_t | SPI_R (uint8_t Register, uint8_t Data) |
SPI command. | |
void | epd_spi_send (unsigned char register_index, unsigned char *register_data, unsigned length) |
SPI command if register data is larger than two bytes. | |
void | epd_spi_send_byte (uint8_t register_index, uint8_t register_data) |
SPI command. | |
int16_t | get_temperature (void) |
Get temperature value from ADC. | |
void | initialize_temperature (void) |
Initialize the temperature sensor. | |
void | EPD_display_hardware_init (void) |
Initialize the EPD hardware setting. |
Detailed Description
The initialization and configuration of COG hardware driver.
Copyright (c) 2012-2014 Pervasive Displays Inc. All rights reserved.
Authors: Pervasive Displays Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file EPD_hardware_driver.cpp.
Function Documentation
void delay_ms | ( | unsigned int | ms ) |
Interrupt Service Routine for Timer A0.
Delay mini-seconds
- Parameters:
-
ms The number of mini-seconds
Definition at line 133 of file EPD_hardware_driver.cpp.
void EPD_display_hardware_init | ( | void | ) |
Initialize the EPD hardware setting.
Definition at line 473 of file EPD_hardware_driver.cpp.
void epd_spi_attach | ( | void | ) |
Initialize SPI.
Definition at line 223 of file EPD_hardware_driver.cpp.
void epd_spi_detach | ( | void | ) |
Disable SPI and change to GPIO.
Definition at line 232 of file EPD_hardware_driver.cpp.
void epd_spi_init | ( | void | ) |
Configure SPI.
Definition at line 196 of file EPD_hardware_driver.cpp.
uint8_t epd_spi_read | ( | unsigned char | RDATA ) |
SPI synchronous read.
Definition at line 261 of file EPD_hardware_driver.cpp.
void epd_spi_send | ( | unsigned char | register_index, |
unsigned char * | register_data, | ||
unsigned | length | ||
) |
SPI command if register data is larger than two bytes.
- Parameters:
-
register_index The Register Index as SPI command to COG register_data The Register Data for sending command data to COG length The number of bytes of Register Data which depends on which Register Index is selected.
Definition at line 327 of file EPD_hardware_driver.cpp.
void epd_spi_send_byte | ( | uint8_t | register_index, |
uint8_t | register_data | ||
) |
SPI command.
- Parameters:
-
register_index The Register Index as SPI command to COG register_data The Register Data for sending command data to COG
Definition at line 350 of file EPD_hardware_driver.cpp.
void epd_spi_write | ( | unsigned char | Data ) |
SPI synchronous write.
Definition at line 251 of file EPD_hardware_driver.cpp.
uint8_t epd_spi_write_ex | ( | unsigned char | Data ) |
Send data to SPI with time out feature.
- Parameters:
-
data The data to be sent out
Definition at line 275 of file EPD_hardware_driver.cpp.
uint32_t get_current_time_tick | ( | void | ) |
Get current Timer after starting a new one.
Definition at line 95 of file EPD_hardware_driver.cpp.
int16_t get_temperature | ( | void | ) |
Get temperature value from ADC.
- Returns:
- the Celsius temperature
Definition at line 378 of file EPD_hardware_driver.cpp.
static void initialize_EPD_timer | ( | void | ) | [static] |
Set up EPD Timer for 1 mSec interrupts.
- Note:
- desired value: 1mSec actual value: 1.000mSec
Definition at line 61 of file EPD_hardware_driver.cpp.
void initialize_temperature | ( | void | ) |
Initialize the temperature sensor.
Definition at line 454 of file EPD_hardware_driver.cpp.
void PWM_run | ( | uint16_t | ms ) |
PWM toggling.
- Parameters:
-
ms The interval of PWM toggling (mini seconds)
Definition at line 177 of file EPD_hardware_driver.cpp.
void PWM_start_toggle | ( | void | ) |
The PWM signal starts toggling.
Definition at line 161 of file EPD_hardware_driver.cpp.
void PWM_stop_toggle | ( | void | ) |
The PWM signal stops toggling.
Definition at line 168 of file EPD_hardware_driver.cpp.
void set_current_time_tick | ( | uint32_t | count ) |
Set current Timer after starting a new one.
Definition at line 101 of file EPD_hardware_driver.cpp.
uint8_t SPI_R | ( | uint8_t | Register, |
uint8_t | Data | ||
) |
SPI command.
- Parameters:
-
register_index The Register Index as SPI Data to COG register_data The Register Data for sending command data to COG
- Returns:
- the SPI read value
Definition at line 300 of file EPD_hardware_driver.cpp.
void start_EPD_timer | ( | void | ) |
Start Timer.
Definition at line 73 of file EPD_hardware_driver.cpp.
void stop_EPD_timer | ( | void | ) |
Stop Timer.
Definition at line 86 of file EPD_hardware_driver.cpp.
void sys_delay_ms | ( | unsigned int | ms ) |
Delay mini-seconds.
- Parameters:
-
ms The number of mini-seconds
Definition at line 144 of file EPD_hardware_driver.cpp.
void SysTick_Handler | ( | void | ) |
Interrupt Service Routine for system tick counter.
Definition at line 107 of file EPD_hardware_driver.cpp.
Generated on Thu Jul 14 2022 17:10:35 by 1.7.2