Exemplo n.º 1
0
void AppProtocolSendMessageWithVarArg(const OUTGOING_MESSAGE* msg, const void* data, int size) {
    if (state != STATE_OPEN) return;
    BYTE prev = SyncInterruptLevel(1);
    ByteQueuePushBuffer(&tx_queue, (const BYTE*) msg, OutgoingMessageLength(msg));
    ByteQueuePushBuffer(&tx_queue, data, size);
    SyncInterruptLevel(prev);
}
Exemplo n.º 2
0
void AppProtocolSendMessageWithVarArgSplit(const OUTGOING_MESSAGE* msg,
                                           const void* data1, int size1,
                                           const void* data2, int size2) {
  BYTE prev = SyncInterruptLevel(1);
  ByteQueuePushBuffer(&tx_queue, (const BYTE*) msg, OutgoingMessageLength(msg));
  ByteQueuePushBuffer(&tx_queue, data1, size1);
  ByteQueuePushBuffer(&tx_queue, data2, size2);
  SyncInterruptLevel(prev);
}
Exemplo n.º 3
0
Arquivo: uart.c Projeto: Arup/ioio
void UARTTransmit(int uart_num, const void* data, int size) {
  log_printf("UARTTransmit(%d, %p, %d)", uart_num, data, size);
  SAVE_UART_FOR_LOG(uart_num);
  BYTE_QUEUE* q = &uarts[uart_num].tx_queue;
  PRIORITY(TX_PRIORITY) {
    ByteQueuePushBuffer(q, data, size);
    AssignUxTXIE(uart_num, 1);  // enable TX int.
  }
}
Exemplo n.º 4
0
void BootProtocolSendMessage(const OUTGOING_MESSAGE* msg) {
  ByteQueuePushBuffer(&tx_queue, (const BYTE*) msg, OutgoingMessageLength(msg));
}
Exemplo n.º 5
0
void AppProtocolSendMessage(const OUTGOING_MESSAGE* msg) {
  BYTE prev = SyncInterruptLevel(1);
  ByteQueuePushBuffer(&tx_queue, (const BYTE*) msg, OutgoingMessageLength(msg));
  SyncInterruptLevel(prev);
}