Skip to content

Commit

Permalink
Renamed HSPIDevice folders to hspi_
Browse files Browse the repository at this point in the history
  • Loading branch information
kauwua committed Feb 24, 2025
1 parent 8ebe281 commit f18677e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 11 deletions.
4 changes: 3 additions & 1 deletion BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
v1.1.4:

* `USBDevice` folder renamed to `usb`
* `SerDesDevice` folder renamed to `serdes`
* `SerDesDevice` folder renamed to `serdes`
* `HSPIDeviceScheduled` folder renamed to `hspi_scheduled`
* `HSPIDevice` folder renamed to `hspi`
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This library was built alongside [Hydradancer](https://github.com/HydraDancer/hy

Reliable drivers were needed for this project and many features were missing from the WCH examples or untested.

This library provides USB3, USB2, HSPI and SerDes drivers that have been tested using the benchmark/integrity tests in `tests/`. It is based on `wch-ch56x-bsp` but its goal is to provide a higher level library. As Hydradancer was using several peripherals at a time (USB3/HSPI, USB2/HSPI), an interrupt queue was implemented to avoid missing interrupts for use with `HSPIDeviceScheduled` along with a static memory pool. While the tests in this repository are simple enough to do the processing inside the interrupt handlers, Hydradancer was missing interrupts and deferring interrupts to user mode was required.
This library provides USB3, USB2, HSPI and SerDes drivers that have been tested using the benchmark/integrity tests in `tests/`. It is based on `wch-ch56x-bsp` but its goal is to provide a higher level library. As Hydradancer was using several peripherals at a time (USB3/HSPI, USB2/HSPI), an interrupt queue was implemented to avoid missing interrupts for use with `hspi_scheduled` along with a static memory pool. While the tests in this repository are simple enough to do the processing inside the interrupt handlers, Hydradancer was missing interrupts and deferring interrupts to user mode was required.

# Using this library in your project

Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
add_library(wch-ch56x-lib INTERFACE)

# With HSPIDeviceScheduled
# With hspi_scheduled
target_sources(wch-ch56x-lib INTERFACE
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/utils/critical_section.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/HSPIDevice/hspi.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/hspi/hspi.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/interrupt_queue/interrupt_queue.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/logging/log_printf.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/logging/log_serdes.c
Expand All @@ -23,13 +23,13 @@ target_include_directories(wch-ch56x-lib INTERFACE ${CMAKE_CURRENT_LIST_DIR})

target_link_libraries(wch-ch56x-lib INTERFACE wch-ch56x-bsp lwrb nanoprintf)

# Without HSPIDeviceScheduled
# Without hspi_scheduled

add_library(wch-ch56x-lib-scheduled INTERFACE)

target_sources(wch-ch56x-lib-scheduled INTERFACE
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/utils/critical_section.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/HSPIDeviceScheduled/hspi_scheduled.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/hspi_scheduled/hspi_scheduled.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/interrupt_queue/interrupt_queue.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/logging/log_printf.c
${CMAKE_CURRENT_LIST_DIR}/wch-ch56x-lib/logging/log_serdes.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
********************************************************************************/

#include "wch-ch56x-lib/HSPIDevice/hspi.h"
#include "wch-ch56x-lib/hspi/hspi.h"
#include "wch-ch56x-lib/logging/logging.h"
#include <stdint.h>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
*******************************************************************************/

#include "wch-ch56x-lib/HSPIDeviceScheduled/hspi_scheduled.h"
#include "wch-ch56x-lib/hspi_scheduled/hspi_scheduled.h"
#include "wch-ch56x-lib/interrupt_queue/interrupt_queue.h"
#include "wch-ch56x-lib/logging/log_to_buffer.h"
#include "wch-ch56x-lib/logging/logging.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
*******************************************************************************/

/**
HSPIDeviceScheduled uses an interrupt queue to process RX and TX interrupts.
hspi_scheduled uses an interrupt queue to process RX and TX interrupts.
It uses a statically allocated pool to save call arguments for use when the
function is scheduled.
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/test_firmware_hspi/User/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop

#include "wch-ch56x-lib/HSPIDevice/hspi.h"
#include "wch-ch56x-lib/hspi/hspi.h"
#include "wch-ch56x-lib/logging/logging.h"
#include "wch-ch56x-lib/usb/usb20.h"
#include "wch-ch56x-lib/usb/usb30.h"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_firmware_loopback/User/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ limitations under the License.
#include "usb2_device_descriptors.h"
#include "usb3_device_descriptors.h"
#include "usb_device.h"
#include "wch-ch56x-lib/HSPIDevice/hspi.h"
#include "wch-ch56x-lib/hspi/hspi.h"
#include "wch-ch56x-lib/logging/logging.h"
#include "wch-ch56x-lib/serdes/serdes.h"
#include "wch-ch56x-lib/usb/usb20.h"
Expand Down

0 comments on commit f18677e

Please sign in to comment.