mirror of
git://soft.sys114.com/klipper
synced 2026-02-13 05:20:33 +09:00
Rewrite chipid.c so that it contains just the USB and canbus id manipulation code. Move the low-level chipid reading to bootrom.c. Also, introduce a new bootrom_reboot_usb_bootloader() function in bootrom.c so that the main.c code does not need to know the specifics of rebooting into the bootrom. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
25 lines
703 B
C
25 lines
703 B
C
#ifndef __RP2040_INTERNAL_H
|
|
#define __RP2040_INTERNAL_H
|
|
// Local definitions for RPxxxx chips
|
|
|
|
#include "autoconf.h" // CONFIG_MACH_RP2040
|
|
|
|
#if CONFIG_MACH_RP2040
|
|
#include "RP2040.h"
|
|
#elif CONFIG_MACH_RP2350
|
|
#include "RP2350.h"
|
|
#endif
|
|
|
|
void enable_pclock(uint32_t reset_bit);
|
|
int is_enabled_pclock(uint32_t reset_bit);
|
|
uint32_t get_pclock_frequency(uint32_t reset_bit);
|
|
void gpio_peripheral(uint32_t gpio, int func, int pull_up);
|
|
void bootrom_reboot_usb_bootloader(void);
|
|
void bootrom_read_unique_id(uint8_t *out, uint32_t maxlen);
|
|
|
|
// Force a function to run from ram
|
|
#define UNIQSEC __FILE__ "." __stringify(__LINE__)
|
|
#define _ramfunc noinline __section(".ramfunc." UNIQSEC)
|
|
|
|
#endif // internal.h
|