Skip to content

Commit 671d675

Browse files
committed
VirtIOSerial and virtio: Fix typo
1 parent fb10c3c commit 671d675

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

cores/arduino/VirtIOSerial.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void VirtIOSerial::begin(void)
5050
if (VIRT_UART_Init(&huart) != VIRT_UART_OK) {
5151
Error_Handler();
5252
}
53-
/*Need to register callback for message reception by channels*/
53+
/* Need to register callback for message reception by channels */
5454
if (VIRT_UART_RegisterCallback(&huart, VIRT_UART_RXCPLT_CB_ID, rxCallback) != VIRT_UART_OK) {
5555
Error_Handler();
5656
}
@@ -60,13 +60,13 @@ void VirtIOSerial::begin(void)
6060

6161
void VirtIOSerial::begin(uint32_t /* baud_count */)
6262
{
63-
// uart config is ignored in USB-CDC
63+
// uart config is ignored in OpenAmp
6464
begin();
6565
}
6666

6767
void VirtIOSerial::begin(uint32_t /* baud_count */, uint8_t /* config */)
6868
{
69-
// uart config is ignored in USB-CDC
69+
// uart config is ignored in OpenAmp
7070
begin();
7171
}
7272

@@ -150,7 +150,6 @@ void VirtIOSerial::flush(void)
150150
return;
151151
}
152152

153-
/* USER CODE BEGIN 4 */
154153
void rxCallback(VIRT_UART_HandleTypeDef *huart)
155154
{
156155
// Linux host must send a dummy data first to finish initialization of rpmsg

cores/arduino/VirtIOSerial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "Stream.h"
2929

3030
//================================================================================
31-
// Serial over CDC
31+
// Serial over OpenAmp
3232
class VirtIOSerial : public Stream {
3333
public:
3434
void begin(void);

cores/arduino/stm32/virtio/virtio_buffer.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void virtio_buffer_init(virtio_buffer_t *ring)
4242

4343
uint16_t virtio_buffer_read_available(virtio_buffer_t *ring)
4444
{
45-
// This will make the function safe when write openrations are done in interrupts
45+
// This will make the function safe when write operations are done in interrupts
4646
volatile uint16_t write = ring->write;
4747

4848
if (write < ring->read) {
@@ -53,7 +53,7 @@ uint16_t virtio_buffer_read_available(virtio_buffer_t *ring)
5353

5454
static uint16_t read_tmp(virtio_buffer_t *ring, uint8_t *dst, uint16_t size)
5555
{
56-
// This will make the function safe when write openrations are done in interrupts
56+
// This will make the function safe when write operations are done in interrupts
5757
volatile uint16_t write = ring->write;
5858
uint16_t end = (write >= ring->read_tmp) ? write : BUFFER_END + 1;
5959

@@ -99,7 +99,7 @@ uint16_t virtio_buffer_peek(virtio_buffer_t *ring, uint8_t *dst, uint16_t size)
9999

100100
uint16_t virtio_buffer_write_available(virtio_buffer_t *ring)
101101
{
102-
// This will make the function safe when read openrations are done in interrupts
102+
// This will make the function safe when read operations are done in interrupts
103103
volatile uint16_t read = ring->read;
104104

105105
if (ring->write < read) {
@@ -110,7 +110,7 @@ uint16_t virtio_buffer_write_available(virtio_buffer_t *ring)
110110

111111
uint16_t virtio_buffer_write(virtio_buffer_t *ring, uint8_t *src, uint16_t size)
112112
{
113-
// This will make the function safe when read openrations are done in a interrupt
113+
// This will make the function safe when read operations are done in a interrupt
114114
volatile uint16_t read = ring->read;
115115
uint16_t end = (ring->write < read) ? read - 1
116116
: (read == 0) ? BUFFER_END : BUFFER_END + 1;

0 commit comments

Comments
 (0)