mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-16 12:53:25 +00:00
Udpdate hackrf submodule (#2906)
* add missing parameter to usb endpoint init * make firmware compile with latest hackrf * updated submodule * format code
This commit is contained in:
@@ -71,9 +71,9 @@ void nvic_enable_irq(uint8_t irqn) {
|
||||
void usb_configuration_changed(usb_device_t* const device) {
|
||||
(void)device;
|
||||
|
||||
usb_endpoint_init(&usb_endpoint_int_in);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_in);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_out);
|
||||
usb_endpoint_init(&usb_endpoint_int_in, false);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_in, false);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_out, false);
|
||||
}
|
||||
|
||||
void setup_usb_serial_controller(void) {
|
||||
@@ -88,8 +88,8 @@ void setup_usb_serial_controller(void) {
|
||||
usb_queue_init(&usb_endpoint_bulk_out_queue);
|
||||
usb_queue_init(&usb_endpoint_bulk_in_queue);
|
||||
|
||||
usb_endpoint_init(&usb_endpoint_control_out);
|
||||
usb_endpoint_init(&usb_endpoint_control_in);
|
||||
usb_endpoint_init(&usb_endpoint_control_out, false);
|
||||
usb_endpoint_init(&usb_endpoint_control_in, false);
|
||||
|
||||
usb_run(&usb_device);
|
||||
}
|
||||
|
||||
@@ -497,7 +497,6 @@ set(MODE_CPPSRC
|
||||
)
|
||||
DeclareTargets(PFUT flash_utility)
|
||||
|
||||
|
||||
### Place external app and disabled images below so they don't get added to the firmware
|
||||
set(add_to_firmware FALSE)
|
||||
set(MODE_FLAGS "-O3")
|
||||
@@ -681,6 +680,8 @@ set(MODE_CPPSRC
|
||||
sd_over_usb/usb_descriptor.c
|
||||
sd_over_usb/hackrf_core.c
|
||||
|
||||
${HACKRF_PATH}/firmware/common/adc.c
|
||||
${HACKRF_PATH}/firmware/common/selftest.c
|
||||
${HACKRF_PATH}/firmware/common/usb.c
|
||||
${HACKRF_PATH}/firmware/common/usb_queue.c
|
||||
${HACKRF_PATH}/firmware/hackrf_usb/usb_device.c
|
||||
|
||||
@@ -241,7 +241,7 @@ w25q80bv_driver_t spi_flash = {
|
||||
|
||||
sgpio_config_t sgpio_config = {
|
||||
.gpio_q_invert = &gpio_q_invert,
|
||||
.gpio_hw_sync_enable = &gpio_hw_sync_enable,
|
||||
.gpio_trigger_enable = &gpio_hw_sync_enable,
|
||||
.slice_mode_multislice = true,
|
||||
};
|
||||
|
||||
@@ -950,7 +950,7 @@ void pin_setup(void) {
|
||||
#ifdef HACKRF_ONE
|
||||
if (detected_platform() == BOARD_ID_HACKRF1_R9) {
|
||||
rf_path.gpio_rx = &gpio_h1r9_rx;
|
||||
sgpio_config.gpio_hw_sync_enable = &gpio_h1r9_hw_sync_enable;
|
||||
sgpio_config.gpio_trigger_enable = &gpio_h1r9_hw_sync_enable;
|
||||
}
|
||||
#endif
|
||||
rf_path_pin_setup(&rf_path);
|
||||
@@ -1041,8 +1041,8 @@ void set_leds(const uint8_t state) {
|
||||
}
|
||||
}
|
||||
|
||||
void hw_sync_enable(const hw_sync_mode_t hw_sync_mode) {
|
||||
gpio_write(sgpio_config.gpio_hw_sync_enable, hw_sync_mode == 1);
|
||||
void trigger_enable(bool hw_sync_mode) {
|
||||
gpio_write(sgpio_config.gpio_trigger_enable, hw_sync_mode == 1);
|
||||
}
|
||||
|
||||
void halt_and_flash(const uint32_t duration) {
|
||||
|
||||
@@ -65,8 +65,8 @@ const usb_request_handlers_t usb_request_handlers = {
|
||||
void usb_configuration_changed(usb_device_t* const device) {
|
||||
(void)device;
|
||||
|
||||
usb_endpoint_init(&usb_endpoint_bulk_in);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_out);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_in, false);
|
||||
usb_endpoint_init(&usb_endpoint_bulk_out, false);
|
||||
}
|
||||
|
||||
void start_usb(void) {
|
||||
@@ -84,8 +84,8 @@ void start_usb(void) {
|
||||
usb_queue_init(&usb_endpoint_bulk_out_queue);
|
||||
usb_queue_init(&usb_endpoint_bulk_in_queue);
|
||||
|
||||
usb_endpoint_init(&usb_endpoint_control_out);
|
||||
usb_endpoint_init(&usb_endpoint_control_in);
|
||||
usb_endpoint_init(&usb_endpoint_control_out, false);
|
||||
usb_endpoint_init(&usb_endpoint_control_in, false);
|
||||
|
||||
nvic_set_priority(NVIC_USB0_IRQ, 255);
|
||||
|
||||
@@ -126,4 +126,4 @@ void usb_transfer(void) {
|
||||
scsi_command(msd_cbw_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
Submodule hackrf updated: c0b15549cb...714e0dccc0
Reference in New Issue
Block a user