Mistake on this page?
Report an issue in GitHub or email us
Functions

The I2C HAL tests ensure driver conformance to defined behaviour. More...

Functions

void fpga_test_i2c_init_free (PinName sda, PinName scl)
 Test that the i2c-master can be initialized/de-initialized using all possible i2c pins. More...
 
void fpga_i2c_test_byte_read (PinName sda, PinName scl)
 Test that I2C master is able to read data from I2C bus using i2c_byte_read. More...
 
void fpga_i2c_test_byte_write (PinName sda, PinName scl)
 Test that I2C master is able to write data to I2C bus using i2c_byte_write. More...
 
void fpga_i2c_test_read (PinName sda, PinName scl)
 Test that I2C master is able to read data from I2C bus using i2c_read. More...
 
void fpga_i2c_test_write (PinName sda, PinName scl)
 Test that I2C master is able to write data to I2C bus using i2c_write. More...
 

Detailed Description

The I2C HAL tests ensure driver conformance to defined behaviour.

To run the I2C hal tests use the command:

mbed test -t <toolchain> -m <target> -n tests-mbed_hal_fpga_ci_test_shield-i2c

Function Documentation

void fpga_i2c_test_byte_read ( PinName  sda,
PinName  scl 
)

Test that I2C master is able to read data from I2C bus using i2c_byte_read.

Given board provides I2C master support. When I2C master reads data from I2C bus using i2c_byte_read. Then data is successfully read.

void fpga_i2c_test_byte_write ( PinName  sda,
PinName  scl 
)

Test that I2C master is able to write data to I2C bus using i2c_byte_write.

Given board provides I2C master support. When I2C master writes data to the I2C bus using i2c_byte_write. Then data is successfully transmitted.

void fpga_i2c_test_read ( PinName  sda,
PinName  scl 
)

Test that I2C master is able to read data from I2C bus using i2c_read.

Given board provides I2C master support. When I2C master reads data from I2C bus using i2c_read. Then data is successfully read.

void fpga_i2c_test_write ( PinName  sda,
PinName  scl 
)

Test that I2C master is able to write data to I2C bus using i2c_write.

Given board provides I2C master support. When I2C master writes data to the I2C bus using i2c_write. Then data is successfully transmitted.

void fpga_test_i2c_init_free ( PinName  sda,
PinName  scl 
)

Test that the i2c-master can be initialized/de-initialized using all possible i2c pins.

Given board provides i2c-master support. When i2c-master is initialized (and then de-initialized) using valid set of i2c pins. Then the operation is successfull.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.