Пример #1
0
/**
* @brief This function handles TIM2 global interrupt.
*/
void TIM2_IRQHandler(void)
{
  /* USER CODE BEGIN TIM2_IRQn 0 */
  U8 i,j;
//  HAL_GPIO_TogglePin(GPIOB,S2_Pin);
  if (updateOneshot != 0) {
    updateOneshot--;
  }
      refreshTimer++;
      recoverTimer++;
      blinkTimer++;
      breathTimer++;
      waveTimer++;
      bckTimer++;
      dynTimer++;
      starlightTimer++;
      if (configuredTimer < 250) {
        configuredTimer++;
      }
      for (i = 0; i < NUMBER_OF_LEDS; i++) {
        lighting[i].tmr++;
      }			
      for (i = 0; i < 3; i++) {
        for (j = 0; j < 3; j++) {
          if (idleState[i].counter[j] != 0) {
            idleState[i].counter[j]--;
          }
        }
      }        
      kbd_TypematicRepeat();
            
      //i2cRecoverTimer++; 
//      HAL_GPIO_WritePin(USB_CON_GPIO_Port, USB_CON_Pin, GPIO_PIN_SET);
      if (deviceMode != CLOCK_MODE)  {      // if device in child lock mode don't scan and send data to the host. 
      debounceStateChange();
      processPendingTasks();
      }
      processPendingCommand();
//      HAL_GPIO_WritePin(USB_CON_GPIO_Port, USB_CON_Pin, GPIO_PIN_RESET);      
//      processPendingCommand();   
  /* USER CODE END TIM2_IRQn 0 */
  HAL_TIM_IRQHandler(&htim2);
  /* USER CODE BEGIN TIM2_IRQn 1 */
//  HAL_GPIO_TogglePin(GPIOC,USB_CON_Pin);
  /* USER CODE END TIM2_IRQn 1 */
}
void ThreadableWebSocketChannelClientWrapper::resume()
{
    m_suspended = false;
    processPendingTasks();
}
void ThreadableWebSocketChannelClientWrapper::didReceiveMessageError()
{
    m_pendingTasks.append(std::make_unique<CrossThreadTask>(&didReceiveMessageErrorCallback, this));
    if (!m_suspended)
        processPendingTasks();
}
void ThreadableWebSocketChannelClientWrapper::didClose(unsigned long unhandledBufferedAmount, WebSocketChannelClient::ClosingHandshakeCompletionStatus closingHandshakeCompletion, unsigned short code, const String& reason)
{
    m_pendingTasks.append(std::make_unique<CrossThreadTask>(&didCloseCallback, this, unhandledBufferedAmount, closingHandshakeCompletion, code, reason));
    if (!m_suspended)
        processPendingTasks();
}
void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake()
{
    m_pendingTasks.append(std::make_unique<CrossThreadTask>(&didStartClosingHandshakeCallback, this));
    if (!m_suspended)
        processPendingTasks();
}
void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned long bufferedAmount)
{
    m_pendingTasks.append(std::make_unique<CrossThreadTask>(&didUpdateBufferedAmountCallback, this, bufferedAmount));
    if (!m_suspended)
        processPendingTasks();
}
void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(PassOwnPtr<Vector<char>> binaryData)
{
    m_pendingTasks.append(std::make_unique<CrossThreadTask>(&didReceiveBinaryDataCallback, this, binaryData));
    if (!m_suspended)
        processPendingTasks();
}
Пример #8
0
void ThreadableWebSocketChannelClientWrapper::didReceiveMessageError()
{
    m_pendingTasks.append(createCallbackTask(&didReceiveMessageErrorCallback, this));
    if (!m_suspended)
        processPendingTasks();
}
Пример #9
0
void ThreadableWebSocketChannelClientWrapper::didStartClosingHandshake()
{
    m_pendingTasks.append(createCallbackTask(&didStartClosingHandshakeCallback, this));
    if (!m_suspended)
        processPendingTasks();
}
Пример #10
0
void ThreadableWebSocketChannelClientWrapper::didUpdateBufferedAmount(unsigned long bufferedAmount)
{
    m_pendingTasks.append(createCallbackTask(&didUpdateBufferedAmountCallback, this, bufferedAmount));
    if (!m_suspended)
        processPendingTasks();
}
Пример #11
0
void ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData(PassOwnPtr<Vector<char> > binaryData)
{
    m_pendingTasks.append(createCallbackTask(&didReceiveBinaryDataCallback, this, binaryData));
    if (!m_suspended)
        processPendingTasks();
}
Пример #12
0
void ThreadableWebSocketChannelClientWrapper::didReceiveMessage(const String& message)
{
    m_pendingTasks.append(createCallbackTask(&didReceiveMessageCallback, this, message));
    if (!m_suspended)
        processPendingTasks();
}
Пример #13
0
void ThreadableWebSocketChannelClientWrapper::didConnect()
{
    m_pendingTasks.append(createCallbackTask(&didConnectCallback, this));
    if (!m_suspended)
        processPendingTasks();
}