Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cases - the summary #15

Open
0xc0170 opened this issue Nov 21, 2016 · 1 comment
Open

Test cases - the summary #15

0xc0170 opened this issue Nov 21, 2016 · 1 comment

Comments

@0xc0170
Copy link
Collaborator

0xc0170 commented Nov 21, 2016

This issue is to track what this CI shield test repo covers and extend it. I would like to keep this updated ,thus take this as a first draft and based on the feedback we update it as needed, and start implementing additions/changes.

1. AnalogIn

    Test cases

    - Analog create and destroy AnalogIn object
    - Analog Input on AIN0 - read() + read_u16()
    - Analog Input on AIN1 - read() + read_u16()
    - Analog Input on AIN2 - read() + read_u16()
    - Analog Input on AIN3 - read() + read_u16()
    - Analog Input on AIN4 - read() + read_u16()
    - Analog Input on AIN5 - read() + read_u16()

2. AnalogOut

    Test cases

    - AnalogOut create and destroy AnalogOut object
    - AnalogOut on AOUT - read(), write(), write_u16()

3. BusIn/Out/InOut

    Test cases

    - BusIn, BusOut and BusInOout create and destroy objects
    - BusInOut to BusInOut - read and write, input and output
    - BusIn - mode() - pullup/down

4. Digital IO

    Test cases

    - DigitalIn/Out create and destroy objects
    - DigitalIn, Out - read/write
    - mode()
    - is_connected()

5. I2C

    Test cases

    // all below are using the default frequency
    - create and destroy I2C object 
    - Invalid write/read (to check return values for failures)
    - LM75B temperature read
    - EEPROM WR single byte
    - EEPROM WR 2 bytes
    - EEPROM WR 10 bytes
    - EEPROM WR 100 bytes

6. InterruptIn

    Test cases

    - create and destroy InterruptIn object
    - Register callback for falling edge
    - Register callback for raising edge
    - enable and disable IRQ
    - read() values

7. PWM

    Test cases

    - create and destroy PWM object
    - Frequency 10ms, 30, 100 and 500ms on all PWM pins available
    - Duty cycle 10, 30, 100, 500ms on all PWM pins available

8. SPI

    Test cases

    // assumes the default frequency
    - create and destroy SPI object
    - open filehandle for SD card
    - write to the SD card
    - read from the SD card
@0xc0170
Copy link
Collaborator Author

0xc0170 commented Nov 30, 2016

To add here as part of an exercise: check return values (we should always check if there's a return value). Seems like some of our API (I2C targets implementation) is not consistent due to a lack of API doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant