Pervasive Displays Library Suite - Basic edition 8.0.1
Library for Pervasive Displays e-paper screens and EXT3 extension board
Loading...
Searching...
No Matches
hV_HAL_Peripherals.h File Reference

Light hardware abstraction layer for peripherals. More...

#include <Arduino.h>
#include <SPI.h>
#include <Wire.h>
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
Include dependency graph for hV_HAL_Peripherals.h:
This graph shows which files directly or indirectly include this file:

Macros

#define hV_HAL_PERIPHERALS_RELEASE   801
 Release.
 
#define mySerial   Serial
 SDK library.
 

Functions

void hV_HAL_begin ()
 General initialisation.
 
void hV_HAL_SPI_begin (uint32_t speed=8000000)
 Configure and start SPI.
 
3-wire SPI bus
Warning
  • Arduino does not support 3-wire SPI, bit-bang simulation
  • Viewer: For compatibility only, not implemented in Linux
Note
hV_HAL_SPI3_begin() sets the pins for 3-wire SPI.
void hV_HAL_SPI3_begin ()
 Configure 3-wire SPI.
 
void hV_HAL_SPI3_define (uint8_t pinClock=SCK, uint8_t pinData=MOSI)
 Set the 3-wire SPI pins.
 
uint8_t hV_HAL_SPI3_read ()
 Read a single byte.
 
void hV_HAL_SPI3_write (uint8_t value)
 Write a single byte.
 
Wire bus
void hV_HAL_Wire_begin ()
 Configure and start Wire bus.
 
void hV_HAL_Wire_end ()
 End Wire bus.
 
void hV_HAL_Wire_transfer (uint8_t address, uint8_t *dataWrite, size_t sizeWrite, uint8_t *dataRead=0, size_t sizeRead=0)
 Combined write and read.
 

Detailed Description

Light hardware abstraction layer for peripherals.

Project Pervasive Displays Library Suite
Based on highView technology

Author
Rei Vilo
Date
21 Mar 2024
Version
801
  • Basic edition: for hobbyists and for basic usage
    Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
    See also
    https://creativecommons.org/licenses/by-sa/4.0/

    Consider the Evaluation or Commercial editions for professionals or organisations and for commercial usage
  • Evaluation edition: for professionals or organisations, evaluation only, no commercial usage
    All rights reserved
  • Commercial edition: for professionals or organisations, commercial usage
    All rights reserved
  • Viewer edition: for professionals or organisations
    All rights reserved
  • Documentation
    All rights reserved

Macro Definition Documentation

◆ mySerial

#define mySerial   Serial

SDK library.

See also
References

SDK other libraries

Other libraries

Function Documentation

◆ hV_HAL_SPI3_begin()

void hV_HAL_SPI3_begin ( )

Configure 3-wire SPI.

Note
Select default SCK as clock and MOSI as data (SDIO)

◆ hV_HAL_SPI3_define()

void hV_HAL_SPI3_define ( uint8_t pinClock = SCK,
uint8_t pinData = MOSI )

Set the 3-wire SPI pins.

Parameters
pinClockclock, default = SCK
pinDatacombined data, default = MOSI

◆ hV_HAL_SPI3_read()

uint8_t hV_HAL_SPI3_read ( )

Read a single byte.

Returns
read byte
Note
Configure the clock pin as output and data pin as input.
Warning
/CS to be managed externally.

◆ hV_HAL_SPI3_write()

void hV_HAL_SPI3_write ( uint8_t value)

Write a single byte.

Parameters
databyte
Note
Configure the clock and data pins as output.
Warning
/CS to be managed externally.

◆ hV_HAL_SPI_begin()

void hV_HAL_SPI_begin ( uint32_t speed = 8000000)

Configure and start SPI.

Parameters
speedSPI speed in Hz, 8000000 = default
Note
Other parameters are
  • Bit order: MSBFIRST
  • Data mode: SPI_MODE0

◆ hV_HAL_Wire_begin()

void hV_HAL_Wire_begin ( )

Configure and start Wire bus.

Note
Master mode only

◆ hV_HAL_Wire_transfer()

void hV_HAL_Wire_transfer ( uint8_t address,
uint8_t * dataWrite,
size_t sizeWrite,
uint8_t * dataRead = 0,
size_t sizeRead = 0 )

Combined write and read.

Parameters
[in]addressI2C device address
[in]dataWritebuffer to write
[in]sizeWritenumber of bytes
[out]dataReadbuffer to read
[in]sizeReadnumber of bytes
Note
If sizeRead = 0, no read performed