mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-23 07:59:03 +00:00
Usb serial (#1648)
* enabled usb clock * added usb stack to application * fixed pll0usb clock setup * implemented serial usb handshake * implemented serial communication * integrated chibios shell * implemented device reset * implemented enter dfu mode * implemented hackrf mode command * implemented flash command * implemented memory manipulation * implemented button control * fixed mode change * improved reset behavior * implemented directory commands * implemented file commands * improved data communication * refactorings
This commit is contained in:
@@ -70,6 +70,7 @@ lcd::ILI9341 display;
|
||||
|
||||
I2C i2c0(&I2CD0);
|
||||
SPI ssp1(&SPID2);
|
||||
portapack::USBSerial usb_serial;
|
||||
|
||||
si5351::Si5351 clock_generator{
|
||||
i2c0, hackrf::one::si5351_i2c_address};
|
||||
@@ -368,7 +369,7 @@ static void shutdown_base() {
|
||||
*
|
||||
* XTAL_OSC = powered down
|
||||
*
|
||||
* PLL0USB = powered down
|
||||
* PLL0USB = XTAL, 480 MHz
|
||||
* PLL0AUDIO = GP_CLKIN, Fcco=491.52 MHz, Fout=12.288 MHz
|
||||
* PLL1 =
|
||||
* OG: GP_CLKIN * 10 = 200 MHz
|
||||
@@ -464,6 +465,8 @@ bool init() {
|
||||
/* Remove /2P divider from PLL1 output to achieve full speed */
|
||||
cgu::pll1::direct();
|
||||
|
||||
usb_serial.initialize();
|
||||
|
||||
i2c0.start(i2c_config_fast_clock);
|
||||
chThdSleepMilliseconds(10);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user