Lines Matching +full:- +full:- +full:run +full:- +full:attempt
5 * SPDX-License-Identifier: Apache-2.0
14 /* LoRaMac-node specific includes */
47 if (!device_is_ready(gpio->port)) { in __sx12xx_configure_pin()
48 LOG_ERR("GPIO device not ready %s", gpio->port->name); in __sx12xx_configure_pin()
49 return -ENODEV; in __sx12xx_configure_pin()
54 LOG_ERR("Cannot configure gpio %s %d: %d", gpio->port->name, in __sx12xx_configure_pin()
55 gpio->pin, err); in __sx12xx_configure_pin()
63 * @brief Attempt to acquire the modem for operations
72 return atomic_cas(&data->modem_usage, STATE_FREE, STATE_BUSY); in modem_acquire()
79 * release operations will only be run once.
89 if (!atomic_cas(&data->modem_usage, STATE_BUSY, STATE_CLEANUP)) { in modem_release()
95 data->operation_done = NULL; in modem_release()
96 atomic_clear(&data->modem_usage); in modem_release()
109 /* Run the callback */ in sx12xx_ev_rx_done()
112 /* Don't run the synchronous code */ in sx12xx_ev_rx_done()
182 /* Don't run the synchronous code */ in sx12xx_ev_rx_error()
190 k_poll_signal_raise(sig, -EIO); in sx12xx_ev_rx_error()
208 return -EINVAL; in sx12xx_lora_send()
246 return -EBUSY; in sx12xx_lora_send_async()
271 return -EBUSY; in sx12xx_lora_recv()
316 return -EINVAL; in sx12xx_lora_recv_async()
323 return -EBUSY; in sx12xx_lora_recv_async()
342 return -EBUSY; in sx12xx_lora_config()
345 Radio.SetChannel(config->frequency); in sx12xx_lora_config()
347 if (config->tx) { in sx12xx_lora_config()
351 Radio.SetTxConfig(MODEM_LORA, config->tx_power, 0, in sx12xx_lora_config()
352 config->bandwidth, config->datarate, in sx12xx_lora_config()
353 config->coding_rate, config->preamble_len, in sx12xx_lora_config()
354 false, true, 0, 0, config->iq_inverted, 4000); in sx12xx_lora_config()
357 Radio.SetRxConfig(MODEM_LORA, config->bandwidth, in sx12xx_lora_config()
358 config->datarate, config->coding_rate, in sx12xx_lora_config()
359 0, config->preamble_len, 10, false, 0, in sx12xx_lora_config()
360 false, 0, 0, config->iq_inverted, true); in sx12xx_lora_config()
363 Radio.SetPublicNetwork(config->public_network); in sx12xx_lora_config()
375 return -EBUSY; in sx12xx_lora_test_cw()