forked from JKI757/radtel-950-pro
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunction_Names.csv
More file actions
We can make this file beautiful and searchable if this error is corrected: It looks like row 3 should actually have 3 columns, instead of 4 in line 2.
60 lines (60 loc) · 12.5 KB
/
Function_Names.csv
File metadata and controls
60 lines (60 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
old function name,guessed function name & purpose,notes on parameter values/types and internal variables
FUN_08000630,BadInstruction_Handler,"Purpose: A trap or handler for when the CPU encounters an unknown/bad instruction. This is likely a default interrupt vector."
FUN_080008d4,Util_IntegerToString,"Purpose: Converts an unsigned integer into a null-terminated ASCII string. This is a common 'itoa' implementation.","param_1: Pointer to a buffer/struct. The resulting string is stored at offset +0x24 from this pointer. param_3: The unsigned integer to convert."
FUN_08000bc0,lib_memset,"Purpose: Standard library function to fill a block of memory with a specific byte value. It's optimized for word/half-word writes.","param_1: (void*) destination pointer. param_2: (uint) number of bytes to fill. param_3: (byte) value to fill with."
FUN_08000f94,lib_bzero,"Purpose: Standard library function to fill a block of memory with zeros. It's an optimized 'memset(..., 0, ...)' or 'bzero'.","param_1: (void*) destination pointer. param_2: (uint) number of bytes to write."
FUN_08001026,lib_strncpy,"Purpose: Standard library function to copy a string with a maximum length, padding with nulls if src is shorter than len.","param_1: (char*) destination. param_2: (char*) source. param_3: (int) max length. Calls lib_bzero (FUN_08000f94) to pad."
FUN_08003c08,I2C_Write_Command_Word,"Purpose: Sends a 6-byte command packet over a serial bus (likely I2C or SPI) and then delays.","param_1: (uint16_t) A 16-bit value split into two bytes in the packet. Notes: Calls FUN_0800b7a6 (a delay function) for 50ms (0x32)."
FUN_08007f04,BK4829_Init,"Purpose: Initializes the BK4829 RF transceiver by writing 50+ register/value pairs. CONFIRMED from Ghidra analysis.","Notes: Writes to registers 0x00-0x7E. Includes AGC table (reg 0x09 x16), audio filters (0x46-0x4F), squelch (0x28-0x2F)."
FUN_080081b8,Flash_ReadWrite_Block,"Purpose: Reads or writes a 128-byte (0x80) block from/to specific addresses in the main Flash or an external SPI Flash.","param_1: (int) 0 = Read, 1 = Write. Notes: Accesses addresses like 0x8000, 0x9000, 0xb000, 0xf000."
FUN_080087f4,Util_Calculate_XOR_Checksum,"Purpose: Calculates a simple 8-bit XOR checksum over a block of data.","param_1: (uint) length. param_2: (byte*) data buffer."
FUN_080088f0,RF_Apply_Frequency_Offset,"Purpose: Applies a frequency offset to a base frequency. Used for RF channel selection.","Notes: Selects a channel struct based on index at DAT_08008930+0xf4. Reads base freq from offset +0x108, offset from +0x134, and writes result to +0x114."
FUN_08009110,Channel_Load_Config,"Purpose: Loads and parses configuration data for a specific channel (0, 1, or 2) from Flash into its runtime struct.","param_1: (int) channel index [0-2]. param_2: (int) 1 = read from flash. param_3: (int) flash offset. Notes: Populates the struct at DAT_08009428 + (param_1 * 0x58)."
FUN_0800956c,SPI_Read_And_CRC16,"Purpose: Reads a block of data from an SPI peripheral and calculates a CRC-16 checksum on the fly.","param_1: (uint) number of bytes to read. Notes: Uses CRC-16-CCITT-FALSE (poly 0x1021). FUN_0802112c is the byte read function."
FUN_0800ac7c,GPS_Parse_NMEA_Coordinate,"Purpose: Parses an NMEA coordinate string (like $GPRMC) into a data structure.","param_1: (char*) NMEA string. param_2: (struct*) struct to fill. Notes: Identifies N/S (0x4E/0x53) and E/W (0x45/0x57) and converts DDMM.MMMM format."
FUN_0800b024,Modem_Scramble_Data,"Purpose: Scrambles/whitens a 7-byte block of data, likely for GMSK/FSK modulation.","param_1: (byte*) input buffer. param_2: (byte*) output buffer. Notes: Uses a complex bit-shifting and XOR feedback algorithm."
FUN_0800b368,DAC_ChannelGate,"Purpose: Sets or clears enable bits in the DAC control register at 0x40007400. CONFIRMED.","param_1: bit index (channel/trigger); param_2: 1 enable, 0 disable."
FUN_0800b388,DAC_BufferGate,"Purpose: Controls the DAC buffer/trigger configuration bits prior to playback.","param_1: bit index (buffer flag); param_2: 1 set, 0 clear."
FUN_0800b3a8,DAC_WaveformWrite,"Purpose: Loads a combined waveform/control word into the DAC waveform register block.","param_1: shift amount; param_2: pointer to packed control words."
FUN_0800b62c,RF_Set_Frequency_Synthesizer,"Purpose: Sets the frequency of the RF synthesizer by writing to a peripheral's registers.","param_1: (uint) Frequency value. param_2: (int) Mode. param_3: (int) Flag. Notes: Writes to registers 0x51, 0x07, 0x08 of an external peripheral."
FUN_0800b7a6,Util_Delay_ms,"Purpose: A blocking delay function, likely in milliseconds.","param_1: (uint) Number of milliseconds to delay. Notes: Calls a nested spin-wait loop (FUN_0800b7c2)."
FUN_0800b7c2,Util_Delay_us,"Purpose: Microsecond delay function used for SPI timing.","param_1: (uint) Number of microseconds to delay."
FUN_0800bd58,ToneMenu_ShowEntry,"Purpose: Formats and renders the currently selected CTCSS/DCS tone or 'OFF' entry on the LCD.","param_1: column slot (RX/TX/etc.); param_2: tone index (0xFFFF => OFF); param_3: tone category. Calls ToneGraphic_Draw to highlight the active selection."
FUN_0800cfd4,ToneGraphic_Draw,"Purpose: Draws the tone bargraph/selection cursor and incorporates the tone palette for the current menu context.","param_1: context (0=receive,1=transmit,2=dual); param_2: number of highlighted cells; param_3: palette id; param_4: non-zero to flush LCD."
FUN_0800dca0,AudioDMA_Trigger,"Purpose: Arms DMA2 with a new sample buffer targeting DAC1 for tone or AFSK playback. CONFIRMED.","Writes length and buffer pointer into DMA2 registers (base 0x40020430) before re-enabling the channel."
FUN_0800e214,Encoder_Reset,"Purpose: Resets encoder state and clears pending flags.","Called when encoder lock is released or mode changes."
FUN_0800e2e0,Encoder_HandleQuadrature,"Purpose: State machine for the front-panel rotary encoder on PB4/PB5. CONFIRMED from Ghidra.","Debounce counter = 200 ticks. Phase A first = CW (0x14), Phase B first = CCW (0x16). Reads GPIO masks 0x10/0x20."
FUN_0800e42c,Encoder_ReadPhases,"Purpose: Reads current phase A and phase B states from GPIO.","Updates internal state buffer at DAT_0800e44c."
FUN_0800f2b0,APRS_SetPTT,"Purpose: Maps APRS modem PTT state onto the GPIO/expander lines (command 0x4001).","param_1: 0=release PTT, 1=assert."
FUN_0800f354,APRS_Modem_CheckReady,"Purpose: Issues modem command 0x14 and inspects the returned status byte for busy/ready.","Returns 2 when the modem signals ready-to-send and triggers APRS_Modem_ReadStatus."
FUN_0800f380,APRS_Modem_ReadStatus,"Purpose: Fetches status payload from the external APRS/AFSK modem via command 0x42/0x22 and caches it.","Updates status buffer, stores RSSI/flags, and toggles modem lines with APRS_SetPTT."
FUN_0800f408,APRS_Modem_StartTX,"Purpose: Primes the modem for transmit, enabling PTT and writing control bytes before sending audio.","Calls APRS_SetPTT(1), queues command frames via FUN_08026fb2, and mirrors status into shared buffers."
FUN_08013618,Keypad_ScanMatrix,"Purpose: Periodically drives PC0-PC3 high and samples PD4-PD7 to decode the 5x4 keypad. CONFIRMED pins.","Uses DAT_800136d8 (GPIOC) for columns, DAT_800136dc (GPIOD) for rows, DAT_800136d0 (PE5) and DAT_800136d4 (PA12) to enable scanning."
FUN_08013c98,ADC_Read_PA1,"Purpose: Single conversion on ADC2 channel 1 (PA1) returning an 8-bit scaled value used for audio level logic.","Calls FUN_08003108(DAT_80013cd0,1,1,7) then waits on FUN_800030a4 before reading FUN_8000309e."
FUN_08013cd4,ADC_Read_PA0,"Purpose: Single conversion on ADC2 channel 0 (PA0) for battery/AGC sensing.","Same ADC2 sequence as FUN_08013c98 but with channel parameter 0."
FUN_08013f90,GPS_USART3_Init,"Purpose: Initialises the GPS UART on PC10/PC11 (USART3) for 9600 baud NMEA reception.","Remaps GPIOC pins, programs USART3 registers at 0x40004800 with divisor 0x2580 (9600 baud), enables TX/RX, and powers the port."
FUN_080153fc,LCD_SetWindowInternal,"Purpose: Stores column/row window coordinates in the LCD command staging buffer at 0x2000A1D0. CONFIRMED.","param_1: x1, param_2: x2, param_3: y1, param_4: y2. Writes to offsets 0x00-0x0A of buffer."
FUN_08015730,LCD_WritePixel,"Purpose: Writes a single RGB565 pixel to the current window position. CONFIRMED.","Bounds-checks against 320x240 (0x140 x 0xF0). Frame buffer at 0x20000BD0."
FUN_080037b0,Display_BufferFlush,"Purpose: Streams the prepared frame buffer to the LCD over the external bus while holding PC12 as chip select.","Asserts GPIOC12, primes DMA (DAT_0800396c -> 0x40020430), waits for completion, then releases the line."
FUN_0801ab04,PTT_Relay_Select,"Purpose: Controls the TX/RX relay matrix: PE13/PE12/PE14/PE7 select PTT path while PB0/PB1 drive accessory enables.","Parameter 1 chooses routing profile; toggles GPIOE via FUN_08012c3a/FUN_08012c3e and clears PB0/PB1 when idle."
FUN_0801c04c,Band_Relay_ShiftIn,"Purpose: Bit-banged serial readback of the RF relay latch using PE15/PE10/PE11.","Clears PE15 (0x8000) before clocking, pulses PE10 (0x400) and samples PE11 (0x800) via FUN_08012c26."
FUN_08020f6c,SPIFlash_CheckBusy,"Purpose: Reads SPI flash status register and checks WIP (Write In Progress) bit. CONFIRMED.","Returns 0 when flash is ready, non-zero when busy."
FUN_08020f80,SPIFlash_Erase32K,"Purpose: Erases a 32KB block using command 0x52. CONFIRMED from Ghidra.","param_1: 24-bit address. Polls status with 500us delays, timeout ~5536 iterations."
FUN_08020ff0,SPIFlash_Erase64K,"Purpose: Erases a 64KB block using command 0xD8. CONFIRMED from Ghidra.","param_1: 24-bit address. Adds 5ms initial delay before polling."
FUN_08021064,SPIFlash_EraseChip,"Purpose: Erases entire chip using command 0xC7 (199). CONFIRMED from Ghidra.","Adds 100ms initial delay before polling. Can take several seconds."
FUN_080210c0,SPIFlash_Erase4K,"Purpose: Erases a 4KB sector using command 0x20. CONFIRMED from Ghidra.","param_1: 24-bit address. Polls status with 2us delays."
FUN_08021180,SPIFlash_Read,"Purpose: Reads data from SPI flash using command 0x03. CONFIRMED from Ghidra.","param_1: 24-bit address. param_2: buffer pointer. param_3: length."
FUN_08021234,SPIFlash_WriteByte,"Purpose: Sends a single byte over the SPI flash bus.","param_1: byte to send. Uses software SPI bit-banging."
FUN_08021314,SPIFlash_PageProgram,"Purpose: Programs data to SPI flash using command 0x02.","param_1: 24-bit address. param_2: data pointer. param_3: length (max 256 per page)."
FUN_0802137c,SPIFlash_WriteEnable,"Purpose: Sends write enable command (0x06) before erase/program operations. CONFIRMED.","Required before any erase or program command."
FUN_08022384,USART_Enable,"Purpose: Enables USART peripheral by setting TE/RE bits.","param_1: USART base address. param_2: enable flags."
FUN_080226b0,UART4_Init,"Purpose: Brings up UART4 on PC10/PC11 at 115200 baud for accessory programming.","Uses FUN_0801272c with the same GPIO masks, writes 0x1C200 to UART4 (0x40004C00), and enables the channel (likely routed through the side connector)."
FUN_0800834c,Bluetooth_UART1_Init,"Purpose: Configures USART1 (PA9/PA10 at 115200 baud) and routes it to the external Bluetooth module via GPIOA remap.","Enables pins with FUN_0801272c (0x400 mask), loads 0x1C200 into USART1 (0x40013800), and sets TE/RE bits before enabling the peripheral."
FUN_08027034,LCD_WaitReady,"Purpose: Waits for LCD controller to be ready by polling status. CONFIRMED.","Loops up to 100 times with 500us delays."
FUN_0802700c,APRS_SendPacket,"Purpose: Builds and sends a 6-byte APRS control packet with command 0x12.","param_1: 16-bit parameter 1. param_2: 16-bit parameter 2."
FUN_0802717c,LCD_FillRect,"Purpose: Fills a rectangular region with a solid color. CONFIRMED.","param_1: y, param_2: x, param_3: width, param_4: height, param_5: RGB565 color."
FUN_080271c0,LCD_WriteCommand,"Purpose: Drives the 8080 bus control lines to emit a single command byte to the TFT panel. CONFIRMED.","param_1: (uint8_t) command value; manipulates GPIOD WR#/CS# via FUN_08012c3a/3e before sending."
FUN_08027220,LCD_WriteData,"Purpose: Writes one data byte to the TFT panel on the 8080 bus. CONFIRMED.","param_1: (uint8_t) data value; uses same GPIOD handshake as LCD_WriteCommand but sets D/C high."
FUN_08027280,LCD_BlitMonoBitmap,"Purpose: Blits a 1-bit-per-pixel bitmap with foreground/background colors. CONFIRMED.","param_1-4: position/size, param_5: bitmap data, param_6: bg color, param_7: fg color."
FUN_08027300,LCD_BlitRGB565,"Purpose: Blits an RGB565 pixel buffer to the display. CONFIRMED.","param_1: y, param_2: x, param_3: width, param_4: height, param_5: pixel buffer pointer."
FUN_08027354,LCD_BeginWrite,"Purpose: Sends RAMWR command (0x2C) to begin pixel data transfer. CONFIRMED.","Called before streaming pixel data."