Skip to content

Commit dfe161a

Browse files
Steven Cooremanadbridge
authored andcommitted
First pass on TB Sense (and EFR32MG12) support
1 parent 71b05b3 commit dfe161a

File tree

78 files changed

+52988
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+52988
-6
lines changed

features/nanostack/FEATURE_NANOSTACK/targets/TARGET_SL_RAIL/NanostackRfPhyEfr32.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ static const RAIL_CsmaConfig_t csma_config = RAIL_CSMA_CONFIG_802_15_4_2003_2p4_
6767
#if defined(TARGET_EFR32MG1)
6868
#include "ieee802154_subg_efr32xg1_configurator_out.h"
6969
#include "ieee802154_efr32xg1_configurator_out.h"
70+
#elif defined(TARGET_EFR32MG12)
71+
#include "ieee802154_efr32xg12_configurator_out.h"
7072
#else
7173
#error "Not a valid target."
7274
#endif
@@ -724,7 +726,7 @@ void RAILCb_RxPacketReceived(void *rxPacketHandle) {
724726
/* Save the pending bit */
725727
last_ack_pending_bit = (rxPacketInfo->dataPtr[1] & (1 << 4)) != 0;
726728
/* Tell the stack we got an ACK */
727-
tr_debug("rACK\n");
729+
//tr_debug("rACK\n");
728730
device_driver.phy_tx_done_cb( rf_radio_driver_id,
729731
current_tx_handle,
730732
PHY_LINK_TX_DONE,
@@ -745,7 +747,7 @@ void RAILCb_RxPacketReceived(void *rxPacketHandle) {
745747
RAIL_AutoAckCancelAck();
746748
}
747749

748-
tr_debug("rPKT %d\n", rxPacketInfo->dataLength);
750+
//tr_debug("rPKT %d\n", rxPacketInfo->dataLength);
749751
/* Feed the received packet into the stack */
750752
device_driver.phy_rx_cb(rxPacketInfo->dataPtr + 1,
751753
rxPacketInfo->dataLength - 1,
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/***************************************************************************//**
2+
* @file PeripheralNames.h
3+
*******************************************************************************
4+
* @section License
5+
* <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
6+
*******************************************************************************
7+
*
8+
* SPDX-License-Identifier: Apache-2.0
9+
*
10+
* Licensed under the Apache License, Version 2.0 (the "License"); you may
11+
* not use this file except in compliance with the License.
12+
* You may obtain a copy of the License at
13+
*
14+
* http://www.apache.org/licenses/LICENSE-2.0
15+
*
16+
* Unless required by applicable law or agreed to in writing, software
17+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
* See the License for the specific language governing permissions and
20+
* limitations under the License.
21+
*
22+
******************************************************************************/
23+
#ifndef MBED_PERIPHERALNAMES_H
24+
#define MBED_PERIPHERALNAMES_H
25+
26+
#include "em_adc.h"
27+
#include "em_usart.h"
28+
#include "em_i2c.h"
29+
30+
#ifdef __cplusplus
31+
extern "C" {
32+
#endif
33+
34+
typedef enum {
35+
ADC_0 = ADC0_BASE
36+
} ADCName;
37+
38+
typedef enum {
39+
I2C_0 = I2C0_BASE,
40+
I2C_1 = I2C1_BASE,
41+
} I2CName;
42+
43+
typedef enum {
44+
PWM_CH0 = 0,
45+
PWM_CH1 = 1,
46+
PWM_CH2 = 2,
47+
PWM_CH3 = 3
48+
} PWMName;
49+
50+
typedef enum {
51+
USART_0 = USART0_BASE,
52+
USART_1 = USART1_BASE,
53+
USART_2 = USART2_BASE,
54+
USART_3 = USART3_BASE,
55+
LEUART_0 = LEUART0_BASE,
56+
} UARTName;
57+
58+
typedef enum {
59+
SPI_0 = USART0_BASE,
60+
SPI_1 = USART1_BASE,
61+
SPI_2 = USART2_BASE,
62+
SPI_3 = USART3_BASE,
63+
} SPIName;
64+
65+
#ifdef __cplusplus
66+
}
67+
#endif
68+
69+
#endif

0 commit comments

Comments
 (0)