-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sensors): support new pipette sensor board (#797)
* add a singlton to hold the version info and an i2c task to attempt to read the io expander and update the singleton * EXEC-617 connect sensor hardware to the version wrapper * EXEC_618 remove e1 firmware varient for pipettes * get tests, simulators compiling and run format * add test for reading presssure when board rev changes * add a test for max pressure cause i'm supprised there wasn't one * format the tests * spelling * lint * format * delay was too short for no reason * R13 was intentionally not populated on the board so the expander returns 0x1 instead of 0x3 * add a getter for max sensor reading * format * format'
- Loading branch information
1 parent
ab1b7d1
commit 7b3d7eb
Showing
32 changed files
with
443 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#pragma once | ||
namespace sensors { | ||
namespace pie4ioe4 { | ||
// https://www.diodes.com/assets/Datasheets/PI4IOE5V6408.pdf | ||
|
||
constexpr uint16_t ADDRESS = 0x43 << 1; | ||
|
||
enum class registers : uint8_t { | ||
dev_id_and_ctl = 0x01, // default 1010 0010 | ||
// reserved 0x02 | ||
io_direction = 0x03, // default 0000 0000 | ||
// reserved 0x04 | ||
output_state = 0x05, // default 0000 0000 | ||
// reserved 0x06 | ||
output_high_impedance = 0x07, // default 1111 1111 | ||
// reserved 0x08 | ||
input_default_state = 0x09, // default 0000 0000 | ||
// reserved 0x0A | ||
pull_up_down_enable = 0x0B, // default 1111 1111 | ||
// reserved 0x0C | ||
pull_up_down_select = 0x0D, // default 0000 0000 | ||
// reserved 0x0E | ||
input_status = 0x0F, // default xxxx xxxx | ||
// reserved 0x10 | ||
interrupt_mask = 0x11, // default 0000 0000 | ||
// reserved 0x12 | ||
interrupt_status = 0x13, // default xxxx xxxx | ||
}; | ||
|
||
enum class version_responses : uint8_t { | ||
// right now only version D1.1 of the pipette sensor board responds | ||
// version 0 does not respond | ||
VERSION_1 = 0x01, // Pipette_sensor board D1.1 | ||
}; | ||
|
||
} // namespace pie4ioe4 | ||
} // namespace sensors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.