Commits on Source (23)
-
Alberto Nidasio authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
-
-
-
-
Emilio Corigliano authored
- Created two methods getAPBTimersClock() and getAPBPeripheralsClock() - Fixed wrong computation of APB2 frequency - Previous usages of getAPBFrequency() now use getAPBTimersClock() for usage compatibility
-
-
Emilio Corigliano authored
Low-level driver features (specific for the stm32f4 family): - 7-bit (tested) and 10-bit (not tested yet) addressing; - Speed modes: Standard (100kHz clock) and Fast (400kHz clock); - Compatibility with all I2C peripherals till I2C4 (easy to extend to additional ones); - Internal configuration of the pins in order to avoid forgetting to set them to ALTERNATE_OD mode (so, avoiding possibility of short-circuits between master and slave); - The configurations of the slave (slave address, addressing mode and speed mode) we want to communicate with are setted before each read/write on the bus; - Support for the reStart condition when wanting to write and then read from the same slave; - Usage of interrupts when possible; In two cases we need polling anyway (limited to a parameter to avoid infinite polling): . I2C_SR2_BUSY doesn't generate an interrupt and we can't communicate with the bus in BUSY state. . I2C_SR1_SB do generate an interrupt, but its handling is a bit tricky since other interrupts are generated in the case of a reStart condition; also, using the interrupt for this, there would be the risk of a deadlock. - Resilience to bus deadlocks; High-level driver features: - Resilience to bus deadlocks embedded before any operation on the bus; - Implementation of higher level methods for using the bus; - Possibility to have a synchronized version of the driver;
-
Emilio Corigliano authored
- The driver logic has been moved directly into the Interrupt Service Routine for events so that the delay for a read or a write is drastically reduced. Now the thread, after setting up peripheral, start condition generation and address sending, is waken up only if the operation completed or an error occurred. Avoiding to wake up at every event the thread executing I2C operations reduces context switches and delay in the completion of the operation. - Now errors are better handled. A user can request the last error(s) occurred. - The support for 10-bit addressing is removed to simplify the driver and to avoid having something not tested in the main branch.
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Davide Mor authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
-
Matteo Pignataro authored
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- .gitlab-ci.yml 14 additions, 23 deletions.gitlab-ci.yml
- .gitmodules 8 additions, 8 deletions.gitmodules
- .vscode/c_cpp_properties.json 55 additions, 0 deletions.vscode/c_cpp_properties.json
- CMakeLists.txt 46 additions, 26 deletionsCMakeLists.txt
- README.md 37 additions, 34 deletionsREADME.md
- cmake/boardcore.cmake 6 additions, 2 deletionscmake/boardcore.cmake
- doc/Doxyfile 2 additions, 1 deletiondoc/Doxyfile
- doc/doxygen-awesome-sidebar-only.css 115 additions, 0 deletionsdoc/doxygen-awesome-sidebar-only.css
- doc/doxygen-awesome.css 2405 additions, 0 deletionsdoc/doxygen-awesome.css
- libs/mavlink-skyward-lib 1 addition, 1 deletionlibs/mavlink-skyward-lib
- libs/miosix-kernel 1 addition, 1 deletionlibs/miosix-kernel
- libs/mxgui 1 addition, 1 deletionlibs/mxgui
- src/entrypoints/sx1278-serial.cpp 219 additions, 0 deletionssrc/entrypoints/sx1278-serial.cpp
- src/shared/ActiveObject.h 15 additions, 8 deletionssrc/shared/ActiveObject.h
- src/shared/actuators/Servo/Servo.cpp 2 additions, 2 deletionssrc/shared/actuators/Servo/Servo.cpp
- src/shared/actuators/Servo/Servo.h 1 addition, 1 deletionsrc/shared/actuators/Servo/Servo.h
- src/shared/algorithms/Algorithm.h 4 additions, 1 deletionsrc/shared/algorithms/Algorithm.h
- src/shared/drivers/canbus/CanDriver/CanDriver.cpp 7 additions, 2 deletionssrc/shared/drivers/canbus/CanDriver/CanDriver.cpp
- src/shared/drivers/i2c/I2C.cpp 102 additions, 0 deletionssrc/shared/drivers/i2c/I2C.cpp
doc/doxygen-awesome-sidebar-only.css
0 → 100644
doc/doxygen-awesome.css
0 → 100644
This diff is collapsed.
src/shared/drivers/i2c/I2C.cpp
0 → 100644