Adding new docs(markdown) for holding thoughts/ideas on design of i2c and multiple mcu support.
This commit is contained in:
parent
e1c2aa85f3
commit
a6c5a32442
2 changed files with 58 additions and 0 deletions
40
i2c_design.md
Normal file
40
i2c_design.md
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
# I2C Design
|
||||||
|
|
||||||
|
# API / Interface
|
||||||
|
|
||||||
|
Ideally the interface should be as simple and portable as possible.
|
||||||
|
|
||||||
|
We don't want the consummer/user of the interface to need to worry about all
|
||||||
|
the details of implimentation.
|
||||||
|
|
||||||
|
For instance the end-user should be able to in one line setup an I2C bus
|
||||||
|
and on a second line to send or receive data.
|
||||||
|
|
||||||
|
|
||||||
|
I have some functions that I think should ideally be "privite" in normal usage.
|
||||||
|
But I need to still be able to access those functions or methods during the
|
||||||
|
testing.
|
||||||
|
|
||||||
|
|
||||||
|
## Error handling
|
||||||
|
|
||||||
|
Errors need to be handled such that the end-user doesn't miss this information.
|
||||||
|
|
||||||
|
## Timeouts
|
||||||
|
|
||||||
|
Sometimes there is errors in hardware or bus/hardware failures. These need to
|
||||||
|
be found quickly and handled.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Sharing
|
||||||
|
|
||||||
|
The I2C bus needs to be shared sometimes. I need to figure out some ways to
|
||||||
|
ensure safe sharing of the bus/resources.
|
||||||
|
|
||||||
|
I think maybe the sharing should be implimented externally to the HAL.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
18
mcu_support.md
Normal file
18
mcu_support.md
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
# MCU Support
|
||||||
|
|
||||||
|
One issue of note is the need to support multiple families and chipsets.
|
||||||
|
|
||||||
|
For the moments I'm assumign I can use the defines from the CH32FUN project's
|
||||||
|
headers to handle this issue.
|
||||||
|
|
||||||
|
The other point of interest is that the linker file and toolchain file will
|
||||||
|
need to be modified to conditionally select options.
|
||||||
|
|
||||||
|
Maybe I need to create multiple linker files, I'm unsure.
|
||||||
|
|
||||||
|
|
||||||
|
I also don't know if the newer MCUs in the CH32V00X series have alternate boot
|
||||||
|
modes or what.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue