File tree Expand file tree Collapse file tree 3 files changed +7
-14
lines changed
libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32 Expand file tree Collapse file tree 3 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -1693,14 +1693,14 @@ int serial_irq_handler_asynch(serial_t *obj)
1693
1693
}
1694
1694
}else {
1695
1695
if (obj -> serial .periph .uart -> IEN & USART_IEN_TXC ){
1696
- USART_IntDisable (obj -> serial .periph .leuart ,USART_IEN_TXC );
1696
+ USART_IntDisable (obj -> serial .periph .uart ,USART_IEN_TXC );
1697
1697
/* Clean up */
1698
1698
serial_dma_irq_fired [obj -> serial .dmaOptionsTX .dmaChannel ] = false;
1699
1699
serial_tx_abort_asynch (obj );
1700
1700
/* Notify CPP land of completion */
1701
1701
return SERIAL_EVENT_TX_COMPLETE & obj -> serial .events ;
1702
1702
}else {
1703
- USART_IntEnable (obj -> serial .periph .leuart ,USART_IEN_TXC );
1703
+ USART_IntEnable (obj -> serial .periph .uart ,USART_IEN_TXC );
1704
1704
}
1705
1705
}
1706
1706
} else {
Original file line number Diff line number Diff line change @@ -41,10 +41,7 @@ uint32_t sleep_block_counter[NUM_SLEEP_MODES] = {0};
41
41
42
42
/**
43
43
* Sleep mode.
44
- * Enter Energy Mode 1, which turns off the clock to the CPU.
45
- *
46
- * In EM1, the CPU is sleeping and the power consumption is only 50 μA/MHz.
47
- * All peripherals, including DMA, PRS and memory system, are still available.
44
+ * Enter the lowest possible sleep mode that is not blocked by ongoing activity.
48
45
*/
49
46
void sleep (void )
50
47
{
@@ -57,13 +54,10 @@ void sleep(void)
57
54
} else if (sleep_block_counter [2 ] > 0 ) {
58
55
/* Blocked everything below EM2, enter EM2 */
59
56
EMU_EnterEM2 (true);
60
- } else if ( sleep_block_counter [ 3 ] > 0 ) {
57
+ } else {
61
58
/* Blocked everything below EM3, enter EM3 */
62
59
EMU_EnterEM3 (true);
63
- } else {
64
- /* Nothing is blocked, enter EM4 */
65
- EMU_EnterEM4 ();
66
- }
60
+ } /* Never enter EM4, as mbed has no way of configuring EM4 wakeup */
67
61
return ;
68
62
}
69
63
Original file line number Diff line number Diff line change 50
50
static uint16_t fill_word = SPI_FILL_WORD ;
51
51
#define SPI_LEAST_ACTIVE_SLEEPMODE EM1
52
52
53
- inline CMU_Clock_TypeDef spi_get_clock_tree (spi_t * obj )
53
+ static inline CMU_Clock_TypeDef spi_get_clock_tree (spi_t * obj )
54
54
{
55
55
switch ((int )obj -> spi .spi ) {
56
56
#ifdef USART0
@@ -71,7 +71,7 @@ inline CMU_Clock_TypeDef spi_get_clock_tree(spi_t *obj)
71
71
}
72
72
}
73
73
74
- inline uint8_t spi_get_index (spi_t * obj )
74
+ static inline uint8_t spi_get_index (spi_t * obj )
75
75
{
76
76
uint8_t index = 0 ;
77
77
switch ((int )obj -> spi .spi ) {
@@ -359,7 +359,6 @@ int spi_master_write(spi_t *obj, int value)
359
359
360
360
/* Wait for transmission of last byte */
361
361
while (!(obj -> spi .spi -> STATUS & USART_STATUS_TXC )) {
362
- sleep (); // TODO_LP this might break other code, write should be separate from read?
363
362
}
364
363
365
364
return spi_read (obj );
You can’t perform that action at this time.
0 commit comments