Skip to content

Commit

Permalink
USB Device software
Browse files Browse the repository at this point in the history
USB software that responds to configuration requests
from the USB host and sets up the device with the
supplied Device and Configuration Descriptors.

Demonstration application that mimics the behavior of
the 'hello_world' test program, but directs its output
over a USB simpleserial connection instead.

Co-authored-by: Marno van der Maas <[email protected]>
  • Loading branch information
alees24 and marnovandermaas committed May 2, 2024
1 parent daafded commit 163d9a6
Show file tree
Hide file tree
Showing 8 changed files with 707 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sw/legacy/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
add_library(common OBJECT sonata_system.c uart.c timer.c rv_plic.c gpio.c i2c.c pwm.c spi.c crt0.S)
add_library(common OBJECT sonata_system.c usbdev.c uart.c timer.c rv_plic.c gpio.c i2c.c pwm.c spi.c crt0.S)
target_include_directories(common INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
1 change: 1 addition & 0 deletions sw/legacy/common/sonata_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define DEFAULT_I2C I2C_FROM_BASE_ADDR(I2C0_BASE)
#define FLASH_SPI SPI_FROM_BASE_ADDR(SPI0_BASE)
#define LCD_SPI SPI_FROM_BASE_ADDR(SPI1_BASE)
#define DEFAULT_USBDEV USBDEV0_BASE

/**
* Writes character to default UART. Signature matches c stdlib function
Expand Down
2 changes: 2 additions & 0 deletions sw/legacy/common/sonata_system_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#define SPI0_BASE 0x80300000
#define SPI1_BASE 0x80301000

#define USBDEV0_BASE 0x80400000

#define RV_PLIC_BASE 0x88000000

#define SIM_CTRL_BASE 0x20000
Expand Down
Loading

0 comments on commit 163d9a6

Please sign in to comment.