LINK: Add javadoc comments

git-svn-id: https://svn.code.sf.net/p/vbam/code/branches/bgk-link@1135 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
bgk 2012-09-17 19:24:00 +00:00
parent 8896c123c4
commit 98d3dd5df7
1 changed files with 33 additions and 24 deletions

View File

@ -100,10 +100,42 @@ extern void CloseLink();
/**
* Get the id of the player of this VBA instance
*
* @return id. -1 means disconnected, 0 means master, > 0 means slave
* @return id -1 means disconnected, 0 means master, > 0 means slave
*/
extern int GetLinkPlayerId();
/**
* Start a link transfer
*
* @param siocnt the value of SIOCNT to be written
*/
extern void StartLink(u16 siocnt);
/**
* Start a general purpose link transfer
*
* @param rcnt the value of RCNT to be written
*/
extern void StartGPLink(u16 rcnt);
/**
* Emulate the linked device
*/
extern void LinkUpdate(int);
/**
* Clean up IPC shared memory
*/
extern void CleanLocalLink();
/**
* Append the current VBA ID to a filemane
*
* @param Input filename to complete
* @return completed filename
*/
extern const char *MakeInstanceFilename(const char *Input);
// register definitions
#define COMM_SIODATA32_L 0x120
#define COMM_SIODATA32_H 0x122
@ -130,27 +162,4 @@ extern int GetLinkPlayerId();
#define JOYCNT_SEND_COMPLETE 4
#define JOYCNT_INT_ENABLE 0x40
extern const char *MakeInstanceFilename(const char *Input);
#ifndef NO_LINK
// Link implementation
extern void StartLink(u16);
extern void StartGPLink(u16);
extern void LinkUpdate(int);
extern void CleanLocalLink();
#else
// stubs to keep #ifdef's out of mainline
inline bool InitLink() { return true; }
inline void CloseLink() { }
inline void StartLink(u16) { }
inline void StartGPLink(u16) { }
inline void LinkUpdate(int) { }
inline void CleanLocalLink() { }
#endif
#endif /* GBA_GBALINK_H */