MCPcopy Create free account
hub / github.com/360Controller/360Controller / SerialConnect

Method SerialConnect

360Controller/_60Controller.cpp:1033–1057  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1031// Serial peripheral support
1032
1033void Xbox360Peripheral::SerialConnect(void)
1034{
1035 SerialDisconnect();
1036 serialHandler = new ChatPadKeyboardClass;
1037 if (serialHandler != NULL)
1038 {
1039 const OSString *keys[] = {
1040 OSString::withCString(kIOSerialDeviceType),
1041 };
1042 const OSObject *objects[] = {
1043 OSNumber::withNumber((unsigned long long)0, 32),
1044 };
1045 OSDictionary *dictionary = OSDictionary::withObjects(objects, keys, sizeof(keys) / sizeof(keys[0]), 0);
1046 if (serialHandler->init(dictionary))
1047 {
1048 serialHandler->attach(this);
1049 serialHandler->start(this);
1050 }
1051 else
1052 {
1053 serialHandler->release();
1054 serialHandler = NULL;
1055 }
1056 }
1057}
1058
1059void Xbox360Peripheral::SerialDisconnect(void)
1060{

Callers

nothing calls this directly

Calls 2

initMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected