libxr
Embedded C++ framework for bare-metal, RTOS and Linux
Loading...
Searching...
No Matches
LibXR::MSPM0SPI Class Reference

MSPM0 SPI 控制器 / MSPM0 SPI controller. More...

#include <mspm0_spi.hpp>

Inheritance diagram for LibXR::MSPM0SPI:
[legend]
Collaboration diagram for LibXR::MSPM0SPI:
[legend]

Classes

struct  Resources
 

Public Member Functions

 MSPM0SPI (Resources res, RawData dma_rx_buffer, RawData dma_tx_buffer, uint32_t dma_enable_min_size=3, SPI::Configuration config={SPI::ClockPolarity::LOW, SPI::ClockPhase::EDGE_1, SPI::Prescaler::DIV_4, false})
 
ErrorCode ReadAndWrite (RawData read_data, ConstRawData write_data, OperationRW &op, bool in_isr=false) override
 进行 SPI 读写操作 / Performs SPI read and write operations.
 
ErrorCode SetConfig (SPI::Configuration config) override
 设置 SPI 配置参数 / Sets SPI configuration parameters.
 
ErrorCode MemRead (uint16_t reg, RawData read_data, OperationRW &op, bool in_isr=false) override
 从 SPI 设备的寄存器读取数据。 Reads data from a specific register of the SPI device.
 
ErrorCode MemWrite (uint16_t reg, ConstRawData write_data, OperationRW &op, bool in_isr=false) override
 向 SPI 设备的寄存器写入数据。 Writes data to a specific register of the SPI device.
 
uint32_t GetMaxBusSpeed () const override
 获取 SPI 设备的最大时钟速度 / Gets the maximum clock speed of the SPI device.
 
Prescaler GetMaxPrescaler () const override
 获取 SPI 设备的最大分频系数 / Gets the maximum prescaler of the SPI device.
 
ErrorCode Transfer (size_t size, OperationRW &op, bool in_isr=false) override
 进行一次SPI传输(使用当前缓冲区数据,零拷贝,支持双缓冲)。 Performs a SPI transfer (zero-copy, supports double buffering).
 
- Public Member Functions inherited from LibXR::SPI
 SPI (RawData rx_buffer, RawData tx_buffer)
 构造函数 / Constructor.
 
virtual ErrorCode Read (RawData read_data, OperationRW &op, bool in_isr=false)
 进行 SPI 读取操作 / Performs SPI read operation.
 
virtual ErrorCode Write (ConstRawData write_data, OperationRW &op, bool in_isr=false)
 进行 SPI 写入操作 / Performs SPI write operation.
 
uint32_t GetBusSpeed () const
 获取 SPI 设备的当前总线速度 / Gets the current bus speed of the SPI device.
 
Prescaler CalcPrescaler (uint32_t target_max_bus_speed, uint32_t target_min_bus_speed, bool increase)
 计算 SPI 分频系数 / Calculates the SPI prescaler.
 
RawData GetRxBuffer ()
 获取接收数据的缓冲区 / Gets the buffer for storing received data.
 
RawData GetTxBuffer ()
 获取发送数据的缓冲区 / Gets the buffer for storing data to be sent.
 
void SwitchBuffer ()
 切换缓冲区 / Switches the buffer.
 
void SetActiveLength (size_t len)
 设置缓冲区的有效数据长度 / Sets the length of valid data in the buffer.
 
size_t GetActiveLength () const
 获取缓冲区的有效数据长度 / Gets the length of valid data in the buffer.
 
Configuration & GetConfig ()
 获取 SPI 配置参数 / Gets the SPI configuration parameters.
 
bool IsDoubleBuffer () const
 检查是否使用双缓冲区 / Checks if double buffering is enabled.
 

Static Public Member Functions

static void OnInterrupt (uint8_t index)
 
static constexpr uint8_t ResolveIndex (IRQn_Type irqn)
 
- Static Public Member Functions inherited from LibXR::SPI
static constexpr uint32_t PrescalerToDiv (Prescaler prescaler)
 将分频系数转换为除数 / Converts a prescaler to a divisor.
 

Additional Inherited Members

- Public Types inherited from LibXR::SPI
enum class  ClockPolarity : uint8_t { LOW = 0 , HIGH = 1 }
 定义 SPI 时钟极性 / Defines the SPI clock polarity. More...
 
enum class  ClockPhase : uint8_t { EDGE_1 = 0 , EDGE_2 = 1 }
 定义 SPI 时钟相位 / Defines the SPI clock phase. More...
 
enum class  Prescaler : uint8_t {
  DIV_1 = 0 , DIV_2 = 1 , DIV_4 = 2 , DIV_8 = 3 ,
  DIV_16 = 4 , DIV_32 = 5 , DIV_64 = 6 , DIV_128 = 7 ,
  DIV_256 = 8 , DIV_512 = 9 , DIV_1024 = 10 , DIV_2048 = 11 ,
  DIV_4096 = 12 , DIV_8192 = 13 , DIV_16384 = 14 , DIV_32768 = 15 ,
  DIV_65536 = 16 , UNKNOWN = 0xFF
}
 
using OperationRW = WriteOperation
 定义读写操作类型的别名 / Defines an alias for the read/write operation type.
 

Detailed Description

MSPM0 SPI 控制器 / MSPM0 SPI controller.

Note
构造时开启 DMA 收发完成中断,并把 SPI 中断设为优先级 1;SysConfig 中该实例的 中断和优先级设置会被覆盖。 The constructor enables the DMA RX/TX done interrupts and sets the SPI interrupt to priority 1, replacing the interrupt and priority settings SysConfig made for the instance.

Definition at line 21 of file mspm0_spi.hpp.

Constructor & Destructor Documentation

◆ MSPM0SPI()

MSPM0SPI::MSPM0SPI ( Resources res,
RawData dma_rx_buffer,
RawData dma_tx_buffer,
uint32_t dma_enable_min_size = 3,
SPI::Configuration config = {SPI::ClockPolarity::LOW, SPI::ClockPhase::EDGE_1, SPI::Prescaler::DIV_4, false} )

Definition at line 19 of file mspm0_spi.cpp.

21 : SPI(dma_rx_buffer, dma_tx_buffer),
22 res_(res),
23 dma_enable_min_size_(dma_enable_min_size)
24{
25 ASSERT(res_.instance != nullptr);
26 ASSERT(res_.clock_freq > 0);
27 ASSERT(res_.index < MAX_SPI_INSTANCES);
28 ASSERT(instance_map_[res_.index] == nullptr);
29 ASSERT(dma_rx_buffer.addr_ != nullptr);
30 ASSERT(dma_tx_buffer.addr_ != nullptr);
31 ASSERT(dma_rx_buffer.size_ > 0);
32 ASSERT(dma_tx_buffer.size_ > 0);
33
34 instance_map_[res_.index] = this;
35
36 // 中断源和优先级由驱动设置,不依赖 SysConfig 的中断配置;优先级低于 SysTick 时基。
37 // The driver sets the interrupt sources and priority instead of relying on the
38 // SysConfig interrupt settings; the priority stays below the SysTick timebase.
39 DL_SPI_disableInterrupt(res_.instance, 0xFFFFFFFFU);
40 DL_SPI_clearInterruptStatus(res_.instance, 0xFFFFFFFFU);
41 DL_SPI_enableInterrupt(res_.instance,
42 DL_SPI_INTERRUPT_DMA_DONE_RX | DL_SPI_INTERRUPT_DMA_DONE_TX);
43 NVIC_SetPriority(res_.irqn, 1U);
44 NVIC_ClearPendingIRQ(res_.irqn);
45 NVIC_EnableIRQ(res_.irqn);
46
47 const ErrorCode SET_CFG_ANS = SetConfig(config);
48 ASSERT(SET_CFG_ANS == ErrorCode::OK);
49}
ErrorCode SetConfig(SPI::Configuration config) override
设置 SPI 配置参数 / Sets SPI configuration parameters.
Definition mspm0_spi.cpp:51
size_t size_
数据字节数 / Data size in bytes
void * addr_
数据起始地址 / Data start address
SPI(RawData rx_buffer, RawData tx_buffer)
构造函数 / Constructor.
Definition spi.hpp:111
ErrorCode
定义错误码枚举 / Defines an enumeration for error codes
@ OK
操作成功 / Operation successful

Member Function Documentation

◆ GetMaxBusSpeed()

uint32_t MSPM0SPI::GetMaxBusSpeed ( ) const
overridevirtual

获取 SPI 设备的最大时钟速度 / Gets the maximum clock speed of the SPI device.

Returns
SPI 设备的最大时钟速度(单位:Hz)。 The maximum clock speed of the SPI device (in Hz).

Implements LibXR::SPI.

Definition at line 84 of file mspm0_spi.cpp.

84{ return res_.clock_freq; }

◆ GetMaxPrescaler()

SPI::Prescaler MSPM0SPI::GetMaxPrescaler ( ) const
overridevirtual

获取 SPI 设备的最大分频系数 / Gets the maximum prescaler of the SPI device.

Returns
SPI 设备的最大分频系数 / The maximum prescaler of the SPI device.

Implements LibXR::SPI.

Definition at line 86 of file mspm0_spi.cpp.

@ DIV_512
分频系数为 512 / Division factor is 512.

◆ MemRead()

ErrorCode MSPM0SPI::MemRead ( uint16_t reg,
RawData read_data,
OperationRW & op,
bool in_isr = false )
overridevirtual

从 SPI 设备的寄存器读取数据。 Reads data from a specific register of the SPI device.

Parameters
reg寄存器地址 / Register address.
read_data读取的数据缓冲区 / Buffer to store read data.
op操作类型(同步/异步) / Operation mode (sync/async).
in_isr是否在中断中进行操作 / Whether the operation is performed in an ISR.
Returns
操作结果的错误码 / Error code indicating success or failure.

Implements LibXR::SPI.

Definition at line 446 of file mspm0_spi.cpp.

447{
448 const uint32_t NEED_READ = static_cast<uint32_t>(read_data.size_);
449 if (NEED_READ == 0)
450 {
451 if (op.type != OperationRW::OperationType::BLOCK)
452 {
453 op.UpdateStatus(in_isr, ErrorCode::OK);
454 }
455 return ErrorCode::OK;
456 }
457
458 if (DmaBusy())
459 {
460 return ErrorCode::BUSY;
461 }
462
463 RawData rx = GetRxBuffer();
464 RawData tx = GetTxBuffer();
465
466 ASSERT(rx.size_ >= (NEED_READ + 1));
467 ASSERT(tx.size_ >= (NEED_READ + 1));
468
469 auto* tx_bytes = static_cast<uint8_t*>(tx.addr_);
470 tx_bytes[0] = static_cast<uint8_t>(reg | 0x80);
471 Memory::FastSet(tx_bytes + 1, 0, NEED_READ);
472
473 const uint32_t TOTAL = NEED_READ + 1;
474
475 if (TOTAL > dma_enable_min_size_)
476 {
477 DL_SPI_clearInterruptStatus(res_.instance, MSPM0_SPI_DMA_INTERRUPT_MASK);
478 NVIC_ClearPendingIRQ(res_.irqn);
479
480 mem_read_ = true;
481 dma_mode_ = DmaMode::DUPLEX;
482 read_buff_ = read_data;
483 rw_op_ = op;
484 dma_result_ = ErrorCode::PENDING;
485 busy_ = true;
486
487 StartDmaDuplex(TOTAL);
488 return CompleteDmaOperation(op, in_isr);
489 }
490
491 ErrorCode ans = PollingTransfer(static_cast<uint8_t*>(rx.addr_), tx_bytes, TOTAL);
492
493 if (ans == ErrorCode::OK)
494 {
495 auto* rx_bytes = static_cast<uint8_t*>(rx.addr_);
496 Memory::FastCopy(read_data.addr_, rx_bytes + 1, NEED_READ);
497 }
498
499 SwitchBuffer();
500
501 if (op.type != OperationRW::OperationType::BLOCK)
502 {
503 op.UpdateStatus(in_isr, ans);
504 }
505
506 return ans;
507}
static void FastSet(void *dst, uint8_t value, size_t size)
快速内存填充 / Fast memory fill
static void FastCopy(void *dst, const void *src, size_t size)
快速内存拷贝 / Fast memory copy
可写原始数据视图 / Mutable raw data view
RawData GetRxBuffer()
获取接收数据的缓冲区 / Gets the buffer for storing received data.
Definition spi.hpp:307
void SwitchBuffer()
切换缓冲区 / Switches the buffer.
Definition spi.hpp:338
RawData GetTxBuffer()
获取发送数据的缓冲区 / Gets the buffer for storing data to be sent.
Definition spi.hpp:323
@ BUSY
忙碌 / Busy
@ PENDING
等待中 / Pending

◆ MemWrite()

ErrorCode MSPM0SPI::MemWrite ( uint16_t reg,
ConstRawData write_data,
OperationRW & op,
bool in_isr = false )
overridevirtual

向 SPI 设备的寄存器写入数据。 Writes data to a specific register of the SPI device.

Parameters
reg寄存器地址 / Register address.
write_data写入的数据缓冲区 / Buffer containing data to write.
op操作类型(同步/异步) / Operation mode (sync/async).
in_isr是否在中断中进行操作 / Whether the operation is performed in an ISR.
Returns
操作结果的错误码 / Error code indicating success or failure.

Implements LibXR::SPI.

Definition at line 509 of file mspm0_spi.cpp.

511{
512 const uint32_t NEED_WRITE = static_cast<uint32_t>(write_data.size_);
513 if (NEED_WRITE == 0)
514 {
515 if (op.type != OperationRW::OperationType::BLOCK)
516 {
517 op.UpdateStatus(in_isr, ErrorCode::OK);
518 }
519 return ErrorCode::OK;
520 }
521
522 if (DmaBusy())
523 {
524 return ErrorCode::BUSY;
525 }
526
527 RawData tx = GetTxBuffer();
528 ASSERT(tx.size_ >= (NEED_WRITE + 1));
529
530 auto* tx_bytes = static_cast<uint8_t*>(tx.addr_);
531 tx_bytes[0] = static_cast<uint8_t>(reg & 0x7F);
532 Memory::FastCopy(tx_bytes + 1, write_data.addr_, NEED_WRITE);
533
534 const uint32_t TOTAL = NEED_WRITE + 1;
535
536 if (TOTAL > dma_enable_min_size_)
537 {
538 DL_SPI_clearInterruptStatus(res_.instance, MSPM0_SPI_DMA_INTERRUPT_MASK);
539 NVIC_ClearPendingIRQ(res_.irqn);
540
541 mem_read_ = false;
542 dma_mode_ = DmaMode::TX_ONLY;
543 read_buff_ = {nullptr, 0};
544 rw_op_ = op;
545 dma_result_ = ErrorCode::PENDING;
546 busy_ = true;
547
548 StartDmaTxOnly(TOTAL);
549 return CompleteDmaOperation(op, in_isr);
550 }
551
552 RawData rx = GetRxBuffer();
553 ErrorCode ans = PollingTransfer(static_cast<uint8_t*>(rx.addr_), tx_bytes, TOTAL);
554
555 SwitchBuffer();
556
557 if (op.type != OperationRW::OperationType::BLOCK)
558 {
559 op.UpdateStatus(in_isr, ans);
560 }
561
562 return ans;
563}
size_t size_
数据字节数 / Data size in bytes
const void * addr_
数据起始地址 / Data start address

◆ OnInterrupt()

void MSPM0SPI::OnInterrupt ( uint8_t index)
static

Definition at line 565 of file mspm0_spi.cpp.

566{
567 if (index >= MAX_SPI_INSTANCES)
568 {
569 return;
570 }
571
572 MSPM0SPI* spi = instance_map_[index];
573 if (spi == nullptr)
574 {
575 return;
576 }
577
578 spi->HandleInterrupt();
579}
MSPM0 SPI 控制器 / MSPM0 SPI controller.
Definition mspm0_spi.hpp:22

◆ ReadAndWrite()

ErrorCode MSPM0SPI::ReadAndWrite ( RawData read_data,
ConstRawData write_data,
OperationRW & op,
bool in_isr = false )
overridevirtual

进行 SPI 读写操作 / Performs SPI read and write operations.

Parameters
read_data存储读取数据的缓冲区 / Buffer to store the read data.
write_data需要写入的数据缓冲区 / Buffer containing the data to be written.
op读写操作类型 / Type of read/write operation.
in_isr是否在中断中进行操作 / Whether the operation is performed in an ISR.
Returns
操作结果的错误码 / Error code indicating the result of the operation.

Implements LibXR::SPI.

Definition at line 304 of file mspm0_spi.cpp.

306{
307 const uint32_t NEED = static_cast<uint32_t>(max(read_data.size_, write_data.size_));
308 const bool IS_READ_ONLY = (write_data.size_ == 0U) && (read_data.size_ > 0U);
309
310 if (NEED == 0)
311 {
312 if (op.type != OperationRW::OperationType::BLOCK)
313 {
314 op.UpdateStatus(in_isr, ErrorCode::OK);
315 }
316 return ErrorCode::OK;
317 }
318
319 if (DmaBusy())
320 {
321 return ErrorCode::BUSY;
322 }
323
324 RawData rx = GetRxBuffer();
325 RawData tx = GetTxBuffer();
326
327 if (rx.size_ < NEED)
328 {
329 return ErrorCode::SIZE_ERR;
330 }
331 if (!IS_READ_ONLY && tx.size_ < NEED)
332 {
333 return ErrorCode::SIZE_ERR;
334 }
335
336 uint8_t* tx_bytes = nullptr;
337 if (!IS_READ_ONLY)
338 {
339 tx_bytes = static_cast<uint8_t*>(tx.addr_);
340 if (write_data.size_ > 0)
341 {
342 Memory::FastCopy(tx_bytes, write_data.addr_, write_data.size_);
343 }
344 if (write_data.size_ < NEED)
345 {
346 Memory::FastSet(tx_bytes + write_data.size_, 0, NEED - write_data.size_);
347 }
348 }
349
350 if (NEED > dma_enable_min_size_)
351 {
352 DL_SPI_clearInterruptStatus(res_.instance, MSPM0_SPI_DMA_INTERRUPT_MASK);
353 NVIC_ClearPendingIRQ(res_.irqn);
354
355 mem_read_ = false;
356 read_buff_ = read_data;
357 rw_op_ = op;
358 dma_result_ = ErrorCode::PENDING;
359 busy_ = true;
360
361 if (IS_READ_ONLY)
362 {
363 dma_mode_ = DmaMode::RX_ONLY;
364 const uint32_t FIRST_CHUNK = min(NEED, RX_ONLY_REPEAT_TX_MAX_FRAMES);
365 rx_only_offset_ = FIRST_CHUNK;
366 rx_only_remaining_ = NEED - FIRST_CHUNK;
367 StartDmaRxOnly(0U, FIRST_CHUNK);
368 }
369 else
370 {
371 dma_mode_ = DmaMode::DUPLEX;
372 StartDmaDuplex(NEED);
373 }
374 return CompleteDmaOperation(op, in_isr);
375 }
376
377 ErrorCode ans = PollingTransfer(static_cast<uint8_t*>(rx.addr_), tx_bytes, NEED);
378
379 if (ans == ErrorCode::OK && read_data.size_ > 0)
380 {
381 Memory::FastCopy(read_data.addr_, rx.addr_, read_data.size_);
382 }
383
384 SwitchBuffer();
385
386 if (op.type != OperationRW::OperationType::BLOCK)
387 {
388 op.UpdateStatus(in_isr, ans);
389 }
390
391 return ans;
392}
@ SIZE_ERR
尺寸错误 / Size error
constexpr auto min(LeftType a, RightType b) -> std::common_type_t< LeftType, RightType >
计算两个数的最小值 / Computes the minimum of two numbers
constexpr auto max(LeftType a, RightType b) -> std::common_type_t< LeftType, RightType >
计算两个数的最大值 / Computes the maximum of two numbers

◆ ResolveIndex()

static constexpr uint8_t LibXR::MSPM0SPI::ResolveIndex ( IRQn_Type irqn)
inlinestaticconstexpr

Definition at line 58 of file mspm0_spi.hpp.

59 {
60 switch (irqn)
61 {
62#if defined(SPI0_BASE)
63 case SPI0_INT_IRQn:
64 return 0;
65#endif
66#if defined(SPI1_BASE)
67 case SPI1_INT_IRQn:
68 return 1;
69#endif
70#if defined(SPI2_BASE)
71 case SPI2_INT_IRQn:
72 return 2;
73#endif
74 default:
75 return INVALID_INSTANCE_INDEX;
76 }
77 }

◆ SetConfig()

ErrorCode MSPM0SPI::SetConfig ( SPI::Configuration config)
overridevirtual

设置 SPI 配置参数 / Sets SPI configuration parameters.

Parameters
config需要应用的 SPI 配置 / The SPI configuration to apply.
Returns
操作结果的错误码 / Error code indicating the result of the operation.

Implements LibXR::SPI.

Definition at line 51 of file mspm0_spi.cpp.

52{
53 DL_SPI_FRAME_FORMAT frame_format = DL_SPI_FRAME_FORMAT_MOTO4_POL0_PHA0;
55 {
56 frame_format = (config.clock_phase == ClockPhase::EDGE_1)
57 ? DL_SPI_FRAME_FORMAT_MOTO4_POL0_PHA0
58 : DL_SPI_FRAME_FORMAT_MOTO4_POL0_PHA1;
59 }
60 else
61 {
62 frame_format = (config.clock_phase == ClockPhase::EDGE_1)
63 ? DL_SPI_FRAME_FORMAT_MOTO4_POL1_PHA0
64 : DL_SPI_FRAME_FORMAT_MOTO4_POL1_PHA1;
65 }
66
67 const uint32_t DIV = SPI::PrescalerToDiv(config.prescaler);
68 if (DIV < 2 || DIV > 512 || (DIV & 0x1) != 0)
69 {
71 }
72
73 const uint32_t SCR = (DIV >> 1) - 1;
74
75 DL_SPI_disable(res_.instance);
76 DL_SPI_setFrameFormat(res_.instance, frame_format);
77 DL_SPI_setBitRateSerialClockDivider(res_.instance, SCR);
78 DL_SPI_enable(res_.instance);
79
80 GetConfig() = config;
81 return ErrorCode::OK;
82}
@ EDGE_1
在第一个时钟边沿采样数据 / Data sampled on the first clock edge.
static constexpr uint32_t PrescalerToDiv(Prescaler prescaler)
将分频系数转换为除数 / Converts a prescaler to a divisor.
Definition spi.hpp:70
@ LOW
时钟空闲时为低电平 / Clock idle low.
Configuration & GetConfig()
获取 SPI 配置参数 / Gets the SPI configuration parameters.
Definition spi.hpp:397
@ NOT_SUPPORT
不支持 / Not supported
ClockPhase clock_phase
SPI 时钟相位 / SPI clock phase.
Definition spi.hpp:89
Prescaler prescaler
SPI 分频系数 / SPI prescaler.
Definition spi.hpp:90
ClockPolarity clock_polarity
SPI 时钟极性 / SPI clock polarity.
Definition spi.hpp:87

◆ Transfer()

ErrorCode MSPM0SPI::Transfer ( size_t size,
OperationRW & op,
bool in_isr = false )
overridevirtual

进行一次SPI传输(使用当前缓冲区数据,零拷贝,支持双缓冲)。 Performs a SPI transfer (zero-copy, supports double buffering).

Parameters
size需要传输的数据大小 / The size of the data to be transferred.
op读写操作类型 / Type of read/write operation.
in_isr是否在中断中进行操作 / Whether the operation is performed in an ISR.
Returns
操作结果的错误码 / Error code indicating the result of the operation.

Implements LibXR::SPI.

Definition at line 394 of file mspm0_spi.cpp.

395{
396 if (size == 0)
397 {
398 if (op.type != OperationRW::OperationType::BLOCK)
399 {
400 op.UpdateStatus(in_isr, ErrorCode::OK);
401 }
402 return ErrorCode::OK;
403 }
404
405 if (DmaBusy())
406 {
407 return ErrorCode::BUSY;
408 }
409
410 RawData rx = GetRxBuffer();
411 RawData tx = GetTxBuffer();
412
413 ASSERT(rx.size_ >= size);
414 ASSERT(tx.size_ >= size);
415
416 if (size > dma_enable_min_size_)
417 {
418 DL_SPI_clearInterruptStatus(res_.instance, MSPM0_SPI_DMA_INTERRUPT_MASK);
419 NVIC_ClearPendingIRQ(res_.irqn);
420
421 mem_read_ = false;
422 dma_mode_ = DmaMode::DUPLEX;
423 read_buff_ = {nullptr, 0};
424 rw_op_ = op;
425 dma_result_ = ErrorCode::PENDING;
426 busy_ = true;
427
428 StartDmaDuplex(static_cast<uint32_t>(size));
429 return CompleteDmaOperation(op, in_isr);
430 }
431
432 ErrorCode ans =
433 PollingTransfer(static_cast<uint8_t*>(rx.addr_),
434 static_cast<const uint8_t*>(tx.addr_), static_cast<uint32_t>(size));
435
436 SwitchBuffer();
437
438 if (op.type != OperationRW::OperationType::BLOCK)
439 {
440 op.UpdateStatus(in_isr, ans);
441 }
442
443 return ans;
444}

The documentation for this class was generated from the following files: