Library to control the EM027BS013 ePaper display from Pervasive Display.

Dependencies:   LM75B

Dependents:   app_epaper_EM027BS013_LPC1549 lpc4088_ebb_epaper EaEpaper_EM027BS013 app_epaper_EM027BS013 ... more

Embed: (wiki syntax)

« Back to documentation index

EPD_hardware_driver.h File Reference

EPD_hardware_driver.h File Reference

The SPI, PWM, Temperature definitions of COG hardware driver. More...

Go to the source code of this file.

Functions

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_send (unsigned char Register, unsigned char *Data, unsigned Length)
 SPI command if register data is larger than two bytes.
void epd_spi_send_byte (uint8_t Register, uint8_t Data)
 SPI command.
uint8_t epd_spi_read (unsigned char RDATA)
 SPI synchronous read.
void epd_spi_write (unsigned char Data)
 SPI synchronous write.
uint8_t epd_spi_write_ex (unsigned char Data)
 Send data to SPI with time out feature.
void sys_delay_ms (unsigned int ms)
 Delay mini-seconds.
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 PWM_start_toggle (void)
 The PWM signal starts toggling.
void PWM_stop_toggle (void)
 The PWM signal stops toggling.
void PWM_run (uint16_t time)
 PWM toggling.
void initialize_temperature (void)
 Initialize the temperature sensor.
int16_t get_temperature (void)
 Get temperature value from ADC.
void EPD_display_hardware_init (void)
 Initialize the EPD hardware setting.
uint8_t SPI_R (uint8_t Register, uint8_t Data)
 SPI command.

Detailed Description

The SPI, PWM, Temperature definitions 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.h.


Function Documentation

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_indexThe Register Index as SPI command to COG
register_dataThe Register Data for sending command data to COG
lengthThe 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_indexThe Register Index as SPI command to COG
register_dataThe 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:
dataThe 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.

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:
msThe 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_indexThe Register Index as SPI Data to COG
register_dataThe 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:
msThe number of mini-seconds

Definition at line 144 of file EPD_hardware_driver.cpp.