File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
hardware/arduino/sam/cores/arduino Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,16 @@ void UARTClass::end( void )
90
90
pmc_disable_periph_clk ( _dwId ) ;
91
91
}
92
92
93
+ void UARTClass::setInterruptPriority (uint32_t priority)
94
+ {
95
+ NVIC_SetPriority (_dwIrq, priority & 0x0F );
96
+ }
97
+
98
+ uint32_t UARTClass::getInterruptPriority ()
99
+ {
100
+ return NVIC_GetPriority (_dwIrq);
101
+ }
102
+
93
103
int UARTClass::available ( void )
94
104
{
95
105
return (uint32_t )(SERIAL_BUFFER_SIZE + _rx_buffer->_iHead - _rx_buffer->_iTail ) % SERIAL_BUFFER_SIZE ;
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ class UARTClass : public HardwareSerial
48
48
int read ( void ) ;
49
49
void flush ( void ) ;
50
50
size_t write ( const uint8_t c ) ;
51
+ void setInterruptPriority (uint32_t priority);
52
+ uint32_t getInterruptPriority ();
51
53
52
54
void IrqHandler ( void ) ;
53
55
You can’t perform that action at this time.
0 commit comments