Skip to content

Commit

Permalink
hal: add SARA R510 identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene committed Mar 25, 2021
1 parent a2e8e25 commit 9177d4e
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions hal/network/lwip/ppp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ void Client::init() {
netif_set_client_data(&if_, netifClientDataIdx_, this);
UNLOCK_TCPIP_CORE();

// FIXME: do we need this workaround for R510?
// XXX:
if (platform_primary_ncp_identifier() == PLATFORM_NCP_SARA_R410) {
// SARA R4 PPP implementation is broken and often times we receive
Expand Down
3 changes: 3 additions & 0 deletions hal/network/ncp/cellular/cellular_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ int cellular_device_info(CellularDevice* info, void* reserved) {
case PLATFORM_NCP_SARA_R410:
info->dev = DEV_SARA_R410;
break;
case PLATFORM_NCP_SARA_R510:
info->dev = DEV_SARA_R510;
break;
case PLATFORM_NCP_QUECTEL_BG96:
info->dev = DEV_QUECTEL_BG96;
break;
Expand Down
1 change: 1 addition & 0 deletions hal/shared/cellular_enums_hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ typedef enum {
DEV_QUECTEL_EG91_E = 10,
DEV_QUECTEL_EG91_NA = 11,
DEV_QUECTEL_EG91_EX = 12,
DEV_SARA_R510 = 13,
} Dev;
//! SIM Status
typedef enum {
Expand Down
1 change: 1 addition & 0 deletions hal/shared/platform_ncp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ PlatformNCPIdentifier platform_ncp_identifier(module_info_t* mi) {
case PLATFORM_NCP_SARA_U201:
case PLATFORM_NCP_SARA_G350:
case PLATFORM_NCP_SARA_R410:
case PLATFORM_NCP_SARA_R510:
case PLATFORM_NCP_QUECTEL_BG96:
case PLATFORM_NCP_QUECTEL_EG91_E:
case PLATFORM_NCP_QUECTEL_EG91_NA:
Expand Down
1 change: 1 addition & 0 deletions hal/shared/platform_ncp.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ enum PlatformNCPIdentifier {
PLATFORM_NCP_SARA_R410 = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_UBLOX, 4),
PLATFORM_NCP_SARA_U260 = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_UBLOX, 5),
PLATFORM_NCP_SARA_U270 = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_UBLOX, 6),
PLATFORM_NCP_SARA_R510 = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_UBLOX, 7),
PLATFORM_NCP_QUECTEL_BG96 = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_QUECTEL, 1),
PLATFORM_NCP_QUECTEL_EG91_E = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_QUECTEL, 2),
PLATFORM_NCP_QUECTEL_EG91_NA = PLATFORM_NCP_IDENTIFIER(PLATFORM_NCP_MANUFACTURER_QUECTEL, 3),
Expand Down
1 change: 1 addition & 0 deletions hal/src/boron/platform_ncp_boron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ bool isValidNcpId(uint8_t id) {
case PlatformNCPIdentifier::PLATFORM_NCP_SARA_U201:
case PlatformNCPIdentifier::PLATFORM_NCP_SARA_G350:
case PlatformNCPIdentifier::PLATFORM_NCP_SARA_R410:
case PlatformNCPIdentifier::PLATFORM_NCP_SARA_R510:
return true;
default:
return false;
Expand Down

0 comments on commit 9177d4e

Please sign in to comment.