esp32/mods/modlora.c
static int lora_socket_socket (mod_network_socket_obj_t *s, int *_errno) {
    if (lora_obj.state == E_LORA_STATE_NOINIT) {
        *_errno = ENETDOWN;
        return -1;
    }
    s->sock_base.sd = 1;
#if defined(USE_BAND_868)
    LORAWAN_SOCKET_SET_DR(s->sock_base.sd, DR_5);
#else
    LORAWAN_SOCKET_SET_DR(s->sock_base.sd, DR_4);
#endif
    return 0;
}
///******************************************************************************/
//// Micro Python bindings; LoRa socket
Micro Python bindings; LoRa socket
Micro Python bindings ; LoRa socket
static int lora_socket_socket (mod_network_socket_obj_t *s, int *_errno) {
    if (lora_obj.state == E_LORA_STATE_NOINIT) {
        *_errno = ENETDOWN;
        return -1;
    }
    s->sock_base.sd = 1;
#if defined(USE_BAND_868)
    LORAWAN_SOCKET_SET_DR(s->sock_base.sd, DR_5);
#else
    LORAWAN_SOCKET_SET_DR(s->sock_base.sd, DR_4);
#endif
    return 0;
}
static int lora_socket_socket ( mod_network_socket_obj_t * s , int * _errno ) { if ( lora_obj . state == E_LORA_STATE_NOINIT ) { * _errno = ENETDOWN ; return -1 ; } s -> sock_base . sd = 1 ; #if defined ( USE_BAND_868 ) LORAWAN_SOCKET_SET_DR ( s -> sock_base . sd , DR_5 ) ; #else LORAWAN_SOCKET_SET_DR ( s -> sock_base . sd , DR_4 ) ; #endif return 0 ; }
Micro Python bindings; LoRa socket
Micro Python bindings ; LoRa socket