Skip to content

Instantly share code, notes, and snippets.

@weidongguo
Created June 16, 2017 02:07
Show Gist options
  • Save weidongguo/92d354c719dac26ddf8c10ad3439b3a9 to your computer and use it in GitHub Desktop.
Save weidongguo/92d354c719dac26ddf8c10ad3439b3a9 to your computer and use it in GitHub Desktop.
// kernel
while(1) {
if(keyboard.IsEndOfLine()) {
new HTTPClient(&m_Net, &m_PWMSoundDevice, &m_Screen);
}
m_Scheduler.Yield();
}
void HTTPClient::Run (void)
{
Keyboard *keyboard = Keyboard::Get();
if(keyboard->IsEndOfLine()){
keyboard->ClearEndOfLine();
Request(keyboard->GetBuffer());
keyboard->ClearBuffer();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment