mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Add LINK_MANAGER field comments from SDK
This commit is contained in:
parent
72bb2bd160
commit
01f2381e01
@ -149,37 +149,42 @@ typedef struct VblankTimerTag {
|
|||||||
|
|
||||||
typedef struct linkManagerTag
|
typedef struct linkManagerTag
|
||||||
{
|
{
|
||||||
/* 0x000 */ u8 acceptSlot_flag;
|
u8 acceptSlot_flag; // Connection slot of child for which Link Manager accepted connection, expressed in bits. (This bit is not dropped for a broken link but is dropped with complete disconnection.)
|
||||||
/* 0x001 */ u8 acceptCount;
|
u8 acceptCount; // Number of child devices for which connections accepted by Link Manager.
|
||||||
/* 0x002 */ vu8 childClockSlave_flag;
|
vu8 childClockSlave_flag; // Flag indicating whether AGB clock slave state is currently being maintained by child.
|
||||||
/* 0x003 */ vu8 parentAck_flag;
|
vu8 parentAck_flag; // Flag indicating the child devices for which the parent received ACK by UNI commmunication.
|
||||||
/* 0x004 */ u8 state;
|
u8 state; // Current link manager state
|
||||||
/* 0x005 */ u8 next_state;
|
u8 next_state; // State that the link manager transitions to when it is next called.
|
||||||
/* 0x006 */ u8 parent_child;
|
u8 parent_child; // Shows whether operating on a parent or child.
|
||||||
/* 0x007 */ u8 pcswitch_flag;
|
u8 pcswitch_flag; // Flag for parent-child switching search.
|
||||||
/* 0x008 */ u8 RFU_powerOn_flag;
|
u8 RFU_powerOn_flag; // Flag indicating whether RFU has been powered down.
|
||||||
/* 0x009 */ u8 linkRecovery_enable;
|
u8 linkRecovery_enable; // ON/OFF flag for the link recovery process.
|
||||||
/* 0x00a */ u8 linkRecovery_start_flag;
|
u8 linkRecovery_start_flag; // Link recovery start flag
|
||||||
/* 0x00b */ u8 fastSearchParent_flag;
|
u8 fastSearchParent_flag; // ON/OFF flag for parent fast search by child.
|
||||||
/* 0x00c */ u8 connectSlot_flag_old;
|
u8 connectSlot_flag_old; // Value of rfuLinkStatus->connectSlot_flag (internally used by the API) when the link manager was called previously.
|
||||||
/* 0x00d */ u8 reserveDisconnectSlot_flag;
|
u8 reserveDisconnectSlot_flag; // Bit indication of the child slot that was reject by child connection authentication and is waiting for disconnect.
|
||||||
/* 0x00e */ u8 active;
|
u8 active; // Link manager operating flag (internally used by the API)
|
||||||
/* 0x00f */ u8 msc_exe_flag;
|
u8 msc_exe_flag; // MSC callback executing flag (internally used by the API)
|
||||||
/* 0x010 */ u8 child_slot;
|
u8 child_slot; // Slot number where child device connected (internally used by the API)
|
||||||
/* 0x011 */ u8 state_bak[2];
|
u8 state_bak[2]; // Backup of link manager state (internally used by the API)
|
||||||
/* 0x014 */ u16 param[2];
|
u16 param[2]; // Region where parameters returned when LMAN callback occurs are stored.
|
||||||
/* 0x018 */ u16 NI_failCounter_limit;
|
u16 NI_failCounter_limit; // Period of failCounter during NI type data transmit/receive (x 16.7 ms) Note: Runs for unlimited time when specifying 0
|
||||||
/* 0x01a */ u16 connect_period;
|
u16 connect_period; // Count for the period to execute a connection process (x 16.7 ms). Note: Runs for unlimited time when specifying 0.
|
||||||
/* 0x01c */ u16 pcswitch_period_bak;
|
u16 pcswitch_period_bak; // Backup for No. 3 SC period during parent-child switching search.
|
||||||
/* 0x01e */ u16 work;
|
u16 work; // Work region used by the link manager.
|
||||||
/* 0x020 */ u16 *acceptable_serialNo_list;
|
u16 *acceptable_serialNo_list; // List of game serial numbers that can accept connections. (See Note below)
|
||||||
/* 0x024 */ VBL_TIMER nameAcceptTimer;
|
VBL_TIMER nameAcceptTimer; // Timer for period to receive game names from child device.
|
||||||
/* 0x030 */ VBL_TIMER linkRecoveryTimer;
|
VBL_TIMER linkRecoveryTimer; // Timer for the link recovery process period for both parent and child. Note: Runs for unlimited time when specifying 0.
|
||||||
/* 0x03c */ INIT_PARAM *init_param;
|
INIT_PARAM *init_param; // Pointer to parameter when executing initial setting process.
|
||||||
/* 0x040 */ void (*LMAN_callback)(u8, u8);
|
void (*LMAN_callback)(u8 msg,u8 param_count); // Pointer to user-defined LMAN callback routine generated by link manager operation.
|
||||||
/* 0x044 */ void (*MSC_callback)(u16);
|
void (*MSC_callback)(u16 REQ_commandID); // User-defined MSC callback function. (When defining the link manager, defines the MSC callback using rfu_LMAN_initializeManager or rfu_LMAN_setMSCCallback without using rfu_setMSCCallback.)
|
||||||
} LINK_MANAGER;
|
} LINK_MANAGER;
|
||||||
|
|
||||||
|
/* Note: The acceptable_serialNo_list uses the following format to specify a list of game serial numbers that the parent device can accept connections from and terminates with 0xffff. (maximum 16 devices)
|
||||||
|
|
||||||
|
u16 acceptable_serialNo_list[]={0x0001, 0x0002, 0x0003, 0xffff};
|
||||||
|
*/
|
||||||
|
|
||||||
extern struct linkManagerTag lman;
|
extern struct linkManagerTag lman;
|
||||||
|
|
||||||
u32 rfu_LMAN_REQBN_softReset_and_checkID(void);
|
u32 rfu_LMAN_REQBN_softReset_and_checkID(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user