Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466

Dependencies:   ssd1331

Committer:
kadonotakashi
Date:
Wed Oct 10 00:33:53 2018 +0000
Revision:
0:8fdf9a60065b
how to make mbed librry

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kadonotakashi 0:8fdf9a60065b 1 /*
kadonotakashi 0:8fdf9a60065b 2 * Copyright (c) , Arm Limited and affiliates.
kadonotakashi 0:8fdf9a60065b 3 * SPDX-License-Identifier: Apache-2.0
kadonotakashi 0:8fdf9a60065b 4 *
kadonotakashi 0:8fdf9a60065b 5 * Licensed under the Apache License, Version 2.0 (the "License");
kadonotakashi 0:8fdf9a60065b 6 * you may not use this file except in compliance with the License.
kadonotakashi 0:8fdf9a60065b 7 * You may obtain a copy of the License at
kadonotakashi 0:8fdf9a60065b 8 *
kadonotakashi 0:8fdf9a60065b 9 * http://www.apache.org/licenses/LICENSE-2.0
kadonotakashi 0:8fdf9a60065b 10 *
kadonotakashi 0:8fdf9a60065b 11 * Unless required by applicable law or agreed to in writing, software
kadonotakashi 0:8fdf9a60065b 12 * distributed under the License is distributed on an "AS IS" BASIS,
kadonotakashi 0:8fdf9a60065b 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
kadonotakashi 0:8fdf9a60065b 14 * See the License for the specific language governing permissions and
kadonotakashi 0:8fdf9a60065b 15 * limitations under the License.
kadonotakashi 0:8fdf9a60065b 16 */
kadonotakashi 0:8fdf9a60065b 17
kadonotakashi 0:8fdf9a60065b 18
kadonotakashi 0:8fdf9a60065b 19 #include <stdbool.h>
kadonotakashi 0:8fdf9a60065b 20 #include <stdlib.h>
kadonotakashi 0:8fdf9a60065b 21 #include <string.h>
kadonotakashi 0:8fdf9a60065b 22 #include <stdint.h>
kadonotakashi 0:8fdf9a60065b 23
kadonotakashi 0:8fdf9a60065b 24 #include "LoRaPHY.h"
kadonotakashi 0:8fdf9a60065b 25 #include "LoRaPHY_stub.h"
kadonotakashi 0:8fdf9a60065b 26
kadonotakashi 0:8fdf9a60065b 27 LoRaRadio *LoRaPHY_stub::radio = NULL;
kadonotakashi 0:8fdf9a60065b 28 uint32_t LoRaPHY_stub::uint32_value = 0;
kadonotakashi 0:8fdf9a60065b 29 uint16_t LoRaPHY_stub::uint16_value = 0;
kadonotakashi 0:8fdf9a60065b 30 uint8_t LoRaPHY_stub::uint8_value = 0;
kadonotakashi 0:8fdf9a60065b 31 int8_t LoRaPHY_stub::int8_value = 0;
kadonotakashi 0:8fdf9a60065b 32 int LoRaPHY_stub::int_value = 0;
kadonotakashi 0:8fdf9a60065b 33 double LoRaPHY_stub::double_value = 0;
kadonotakashi 0:8fdf9a60065b 34 lorawan_status_t LoRaPHY_stub::lorawan_status_value = LORAWAN_STATUS_OK;
kadonotakashi 0:8fdf9a60065b 35 channel_params_t *LoRaPHY_stub::channel_params_ptr = NULL;
kadonotakashi 0:8fdf9a60065b 36 uint8_t LoRaPHY_stub::bool_counter = 0;
kadonotakashi 0:8fdf9a60065b 37 bool LoRaPHY_stub::bool_table[20] = {};
kadonotakashi 0:8fdf9a60065b 38 uint8_t LoRaPHY_stub::linkAdrNbBytesParsed = 0;
kadonotakashi 0:8fdf9a60065b 39 uint8_t LoRaPHY_stub::ch_mask_value = 0;
kadonotakashi 0:8fdf9a60065b 40 uint8_t LoRaPHY_stub::adr_parse_count = 0;
kadonotakashi 0:8fdf9a60065b 41
kadonotakashi 0:8fdf9a60065b 42 LoRaPHY::LoRaPHY()
kadonotakashi 0:8fdf9a60065b 43 : _radio(LoRaPHY_stub::radio)
kadonotakashi 0:8fdf9a60065b 44 {
kadonotakashi 0:8fdf9a60065b 45 }
kadonotakashi 0:8fdf9a60065b 46
kadonotakashi 0:8fdf9a60065b 47 LoRaPHY::~LoRaPHY()
kadonotakashi 0:8fdf9a60065b 48 {
kadonotakashi 0:8fdf9a60065b 49 }
kadonotakashi 0:8fdf9a60065b 50
kadonotakashi 0:8fdf9a60065b 51 void LoRaPHY::initialize(LoRaWANTimeHandler *lora_time)
kadonotakashi 0:8fdf9a60065b 52 {
kadonotakashi 0:8fdf9a60065b 53 }
kadonotakashi 0:8fdf9a60065b 54
kadonotakashi 0:8fdf9a60065b 55 bool LoRaPHY::mask_bit_test(const uint16_t *mask, unsigned bit)
kadonotakashi 0:8fdf9a60065b 56 {
kadonotakashi 0:8fdf9a60065b 57 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 58 }
kadonotakashi 0:8fdf9a60065b 59
kadonotakashi 0:8fdf9a60065b 60 void LoRaPHY::mask_bit_set(uint16_t *mask, unsigned bit)
kadonotakashi 0:8fdf9a60065b 61 {
kadonotakashi 0:8fdf9a60065b 62 }
kadonotakashi 0:8fdf9a60065b 63
kadonotakashi 0:8fdf9a60065b 64 void LoRaPHY::mask_bit_clear(uint16_t *mask, unsigned bit)
kadonotakashi 0:8fdf9a60065b 65 {
kadonotakashi 0:8fdf9a60065b 66 }
kadonotakashi 0:8fdf9a60065b 67
kadonotakashi 0:8fdf9a60065b 68 void LoRaPHY::set_radio_instance(LoRaRadio &radio)
kadonotakashi 0:8fdf9a60065b 69 {
kadonotakashi 0:8fdf9a60065b 70 }
kadonotakashi 0:8fdf9a60065b 71
kadonotakashi 0:8fdf9a60065b 72 void LoRaPHY::put_radio_to_sleep()
kadonotakashi 0:8fdf9a60065b 73 {
kadonotakashi 0:8fdf9a60065b 74 }
kadonotakashi 0:8fdf9a60065b 75
kadonotakashi 0:8fdf9a60065b 76 void LoRaPHY::put_radio_to_standby()
kadonotakashi 0:8fdf9a60065b 77 {
kadonotakashi 0:8fdf9a60065b 78 }
kadonotakashi 0:8fdf9a60065b 79
kadonotakashi 0:8fdf9a60065b 80 void LoRaPHY::setup_public_network_mode(bool set)
kadonotakashi 0:8fdf9a60065b 81 {
kadonotakashi 0:8fdf9a60065b 82 }
kadonotakashi 0:8fdf9a60065b 83
kadonotakashi 0:8fdf9a60065b 84 void LoRaPHY::handle_receive(void)
kadonotakashi 0:8fdf9a60065b 85 {
kadonotakashi 0:8fdf9a60065b 86 }
kadonotakashi 0:8fdf9a60065b 87
kadonotakashi 0:8fdf9a60065b 88 uint32_t LoRaPHY::get_radio_rng()
kadonotakashi 0:8fdf9a60065b 89 {
kadonotakashi 0:8fdf9a60065b 90 return LoRaPHY_stub::uint32_value;
kadonotakashi 0:8fdf9a60065b 91 }
kadonotakashi 0:8fdf9a60065b 92
kadonotakashi 0:8fdf9a60065b 93 void LoRaPHY::handle_send(uint8_t *buf, uint8_t size)
kadonotakashi 0:8fdf9a60065b 94 {
kadonotakashi 0:8fdf9a60065b 95 }
kadonotakashi 0:8fdf9a60065b 96
kadonotakashi 0:8fdf9a60065b 97 uint8_t LoRaPHY::request_new_channel(int8_t channel_id, channel_params_t *new_channel)
kadonotakashi 0:8fdf9a60065b 98 {
kadonotakashi 0:8fdf9a60065b 99 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 100 }
kadonotakashi 0:8fdf9a60065b 101
kadonotakashi 0:8fdf9a60065b 102 int32_t LoRaPHY::get_random(int32_t min, int32_t max)
kadonotakashi 0:8fdf9a60065b 103 {
kadonotakashi 0:8fdf9a60065b 104 return LoRaPHY_stub::uint32_value;
kadonotakashi 0:8fdf9a60065b 105 }
kadonotakashi 0:8fdf9a60065b 106
kadonotakashi 0:8fdf9a60065b 107 bool LoRaPHY::verify_channel_DR(uint16_t *channel_mask, int8_t dr)
kadonotakashi 0:8fdf9a60065b 108 {
kadonotakashi 0:8fdf9a60065b 109 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 110 }
kadonotakashi 0:8fdf9a60065b 111
kadonotakashi 0:8fdf9a60065b 112 bool LoRaPHY::val_in_range(int8_t value, int8_t min, int8_t max)
kadonotakashi 0:8fdf9a60065b 113 {
kadonotakashi 0:8fdf9a60065b 114 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 115 }
kadonotakashi 0:8fdf9a60065b 116
kadonotakashi 0:8fdf9a60065b 117 bool LoRaPHY::disable_channel(uint16_t *channel_mask, uint8_t id,
kadonotakashi 0:8fdf9a60065b 118 uint8_t max_channels_num)
kadonotakashi 0:8fdf9a60065b 119 {
kadonotakashi 0:8fdf9a60065b 120 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 121 }
kadonotakashi 0:8fdf9a60065b 122
kadonotakashi 0:8fdf9a60065b 123 uint8_t LoRaPHY::count_bits(uint16_t mask, uint8_t nbBits)
kadonotakashi 0:8fdf9a60065b 124 {
kadonotakashi 0:8fdf9a60065b 125 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 126 }
kadonotakashi 0:8fdf9a60065b 127
kadonotakashi 0:8fdf9a60065b 128 uint8_t LoRaPHY::num_active_channels(uint16_t *channel_mask, uint8_t start_idx,
kadonotakashi 0:8fdf9a60065b 129 uint8_t stop_idx)
kadonotakashi 0:8fdf9a60065b 130 {
kadonotakashi 0:8fdf9a60065b 131 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 132 }
kadonotakashi 0:8fdf9a60065b 133
kadonotakashi 0:8fdf9a60065b 134 void LoRaPHY::copy_channel_mask(uint16_t *dest_mask, uint16_t *src_mask, uint8_t len)
kadonotakashi 0:8fdf9a60065b 135 {
kadonotakashi 0:8fdf9a60065b 136 if ((dest_mask != NULL) && (src_mask != NULL)) {
kadonotakashi 0:8fdf9a60065b 137 for (uint8_t i = 0; i < len; i++) {
kadonotakashi 0:8fdf9a60065b 138 dest_mask[i] = src_mask[i];
kadonotakashi 0:8fdf9a60065b 139 }
kadonotakashi 0:8fdf9a60065b 140 }
kadonotakashi 0:8fdf9a60065b 141 }
kadonotakashi 0:8fdf9a60065b 142
kadonotakashi 0:8fdf9a60065b 143 void LoRaPHY::set_last_tx_done(uint8_t channel, bool joined, lorawan_time_t last_tx_done_time)
kadonotakashi 0:8fdf9a60065b 144 {
kadonotakashi 0:8fdf9a60065b 145 }
kadonotakashi 0:8fdf9a60065b 146
kadonotakashi 0:8fdf9a60065b 147 lorawan_time_t LoRaPHY::update_band_timeoff(bool joined, bool duty_cycle,
kadonotakashi 0:8fdf9a60065b 148 band_t *bands, uint8_t nb_bands)
kadonotakashi 0:8fdf9a60065b 149 {
kadonotakashi 0:8fdf9a60065b 150 return LoRaPHY_stub::uint32_value;
kadonotakashi 0:8fdf9a60065b 151 }
kadonotakashi 0:8fdf9a60065b 152
kadonotakashi 0:8fdf9a60065b 153 uint8_t LoRaPHY::parse_link_ADR_req(const uint8_t *payload,
kadonotakashi 0:8fdf9a60065b 154 link_adr_params_t *params)
kadonotakashi 0:8fdf9a60065b 155 {
kadonotakashi 0:8fdf9a60065b 156 params->ch_mask_ctrl = LoRaPHY_stub::ch_mask_value;
kadonotakashi 0:8fdf9a60065b 157
kadonotakashi 0:8fdf9a60065b 158 if (LoRaPHY_stub::adr_parse_count) {
kadonotakashi 0:8fdf9a60065b 159 return --LoRaPHY_stub::adr_parse_count;
kadonotakashi 0:8fdf9a60065b 160 }
kadonotakashi 0:8fdf9a60065b 161
kadonotakashi 0:8fdf9a60065b 162 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 163 }
kadonotakashi 0:8fdf9a60065b 164
kadonotakashi 0:8fdf9a60065b 165 uint8_t LoRaPHY::verify_link_ADR_req(verify_adr_params_t *verify_params,
kadonotakashi 0:8fdf9a60065b 166 int8_t *dr, int8_t *tx_pow, uint8_t *nb_rep)
kadonotakashi 0:8fdf9a60065b 167 {
kadonotakashi 0:8fdf9a60065b 168 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 169 }
kadonotakashi 0:8fdf9a60065b 170
kadonotakashi 0:8fdf9a60065b 171 void LoRaPHY::get_rx_window_params(double t_symb, uint8_t min_rx_symb,
kadonotakashi 0:8fdf9a60065b 172 uint32_t rx_error, uint32_t wakeup_time,
kadonotakashi 0:8fdf9a60065b 173 uint32_t *window_timeout, int32_t *window_offset)
kadonotakashi 0:8fdf9a60065b 174 {
kadonotakashi 0:8fdf9a60065b 175 }
kadonotakashi 0:8fdf9a60065b 176
kadonotakashi 0:8fdf9a60065b 177 int8_t LoRaPHY::compute_tx_power(int8_t tx_power_idx, float max_eirp,
kadonotakashi 0:8fdf9a60065b 178 float antenna_gain)
kadonotakashi 0:8fdf9a60065b 179 {
kadonotakashi 0:8fdf9a60065b 180 return LoRaPHY_stub::int8_value;
kadonotakashi 0:8fdf9a60065b 181 }
kadonotakashi 0:8fdf9a60065b 182
kadonotakashi 0:8fdf9a60065b 183
kadonotakashi 0:8fdf9a60065b 184 int8_t LoRaPHY::get_next_lower_dr(int8_t dr, int8_t min_dr)
kadonotakashi 0:8fdf9a60065b 185 {
kadonotakashi 0:8fdf9a60065b 186 return LoRaPHY_stub::int8_value;
kadonotakashi 0:8fdf9a60065b 187 }
kadonotakashi 0:8fdf9a60065b 188
kadonotakashi 0:8fdf9a60065b 189 uint8_t LoRaPHY::get_bandwidth(uint8_t dr)
kadonotakashi 0:8fdf9a60065b 190 {
kadonotakashi 0:8fdf9a60065b 191 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 192 }
kadonotakashi 0:8fdf9a60065b 193
kadonotakashi 0:8fdf9a60065b 194 uint8_t LoRaPHY::enabled_channel_count(uint8_t datarate,
kadonotakashi 0:8fdf9a60065b 195 const uint16_t *channel_mask,
kadonotakashi 0:8fdf9a60065b 196 uint8_t *channel_indices,
kadonotakashi 0:8fdf9a60065b 197 uint8_t *delayTx)
kadonotakashi 0:8fdf9a60065b 198 {
kadonotakashi 0:8fdf9a60065b 199 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 200 }
kadonotakashi 0:8fdf9a60065b 201
kadonotakashi 0:8fdf9a60065b 202 bool LoRaPHY::is_datarate_supported(const int8_t datarate) const
kadonotakashi 0:8fdf9a60065b 203 {
kadonotakashi 0:8fdf9a60065b 204 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 205 }
kadonotakashi 0:8fdf9a60065b 206
kadonotakashi 0:8fdf9a60065b 207 void LoRaPHY::reset_to_default_values(loramac_protocol_params *params, bool init)
kadonotakashi 0:8fdf9a60065b 208 {
kadonotakashi 0:8fdf9a60065b 209 }
kadonotakashi 0:8fdf9a60065b 210
kadonotakashi 0:8fdf9a60065b 211 int8_t LoRaPHY::get_next_lower_tx_datarate(int8_t datarate)
kadonotakashi 0:8fdf9a60065b 212 {
kadonotakashi 0:8fdf9a60065b 213 return LoRaPHY_stub::int8_value;
kadonotakashi 0:8fdf9a60065b 214 }
kadonotakashi 0:8fdf9a60065b 215
kadonotakashi 0:8fdf9a60065b 216 uint8_t LoRaPHY::get_minimum_rx_datarate()
kadonotakashi 0:8fdf9a60065b 217 {
kadonotakashi 0:8fdf9a60065b 218 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 219 }
kadonotakashi 0:8fdf9a60065b 220
kadonotakashi 0:8fdf9a60065b 221 uint8_t LoRaPHY::get_minimum_tx_datarate()
kadonotakashi 0:8fdf9a60065b 222 {
kadonotakashi 0:8fdf9a60065b 223 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 224 }
kadonotakashi 0:8fdf9a60065b 225
kadonotakashi 0:8fdf9a60065b 226 uint8_t LoRaPHY::get_default_tx_datarate()
kadonotakashi 0:8fdf9a60065b 227 {
kadonotakashi 0:8fdf9a60065b 228 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 229 }
kadonotakashi 0:8fdf9a60065b 230
kadonotakashi 0:8fdf9a60065b 231 uint8_t LoRaPHY::get_default_max_tx_datarate()
kadonotakashi 0:8fdf9a60065b 232 {
kadonotakashi 0:8fdf9a60065b 233 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 234 }
kadonotakashi 0:8fdf9a60065b 235
kadonotakashi 0:8fdf9a60065b 236 uint8_t LoRaPHY::get_default_tx_power()
kadonotakashi 0:8fdf9a60065b 237 {
kadonotakashi 0:8fdf9a60065b 238 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 239 }
kadonotakashi 0:8fdf9a60065b 240
kadonotakashi 0:8fdf9a60065b 241 uint8_t LoRaPHY::get_max_payload(uint8_t datarate, bool use_repeater)
kadonotakashi 0:8fdf9a60065b 242 {
kadonotakashi 0:8fdf9a60065b 243 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 244 }
kadonotakashi 0:8fdf9a60065b 245
kadonotakashi 0:8fdf9a60065b 246 uint16_t LoRaPHY::get_maximum_frame_counter_gap()
kadonotakashi 0:8fdf9a60065b 247 {
kadonotakashi 0:8fdf9a60065b 248 return LoRaPHY_stub::uint16_value;
kadonotakashi 0:8fdf9a60065b 249 }
kadonotakashi 0:8fdf9a60065b 250
kadonotakashi 0:8fdf9a60065b 251 uint32_t LoRaPHY::get_ack_timeout()
kadonotakashi 0:8fdf9a60065b 252 {
kadonotakashi 0:8fdf9a60065b 253 return LoRaPHY_stub::uint32_value;
kadonotakashi 0:8fdf9a60065b 254 }
kadonotakashi 0:8fdf9a60065b 255
kadonotakashi 0:8fdf9a60065b 256 uint32_t LoRaPHY::get_default_rx2_frequency()
kadonotakashi 0:8fdf9a60065b 257 {
kadonotakashi 0:8fdf9a60065b 258 return LoRaPHY_stub::uint32_value;
kadonotakashi 0:8fdf9a60065b 259 }
kadonotakashi 0:8fdf9a60065b 260
kadonotakashi 0:8fdf9a60065b 261 uint8_t LoRaPHY::get_default_rx2_datarate()
kadonotakashi 0:8fdf9a60065b 262 {
kadonotakashi 0:8fdf9a60065b 263 return phy_params.rx_window2_datarate;
kadonotakashi 0:8fdf9a60065b 264 }
kadonotakashi 0:8fdf9a60065b 265
kadonotakashi 0:8fdf9a60065b 266 uint16_t *LoRaPHY::get_channel_mask(bool get_default)
kadonotakashi 0:8fdf9a60065b 267 {
kadonotakashi 0:8fdf9a60065b 268 return &LoRaPHY_stub::uint16_value;
kadonotakashi 0:8fdf9a60065b 269 }
kadonotakashi 0:8fdf9a60065b 270
kadonotakashi 0:8fdf9a60065b 271 uint8_t LoRaPHY::get_max_nb_channels()
kadonotakashi 0:8fdf9a60065b 272 {
kadonotakashi 0:8fdf9a60065b 273 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 274 }
kadonotakashi 0:8fdf9a60065b 275
kadonotakashi 0:8fdf9a60065b 276 channel_params_t *LoRaPHY::get_phy_channels()
kadonotakashi 0:8fdf9a60065b 277 {
kadonotakashi 0:8fdf9a60065b 278 return LoRaPHY_stub::channel_params_ptr;
kadonotakashi 0:8fdf9a60065b 279 }
kadonotakashi 0:8fdf9a60065b 280
kadonotakashi 0:8fdf9a60065b 281 bool LoRaPHY::is_custom_channel_plan_supported()
kadonotakashi 0:8fdf9a60065b 282 {
kadonotakashi 0:8fdf9a60065b 283 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 284 }
kadonotakashi 0:8fdf9a60065b 285
kadonotakashi 0:8fdf9a60065b 286 void LoRaPHY::restore_default_channels()
kadonotakashi 0:8fdf9a60065b 287 {
kadonotakashi 0:8fdf9a60065b 288 }
kadonotakashi 0:8fdf9a60065b 289
kadonotakashi 0:8fdf9a60065b 290 bool LoRaPHY::verify_rx_datarate(uint8_t datarate)
kadonotakashi 0:8fdf9a60065b 291 {
kadonotakashi 0:8fdf9a60065b 292 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 293 }
kadonotakashi 0:8fdf9a60065b 294
kadonotakashi 0:8fdf9a60065b 295 bool LoRaPHY::verify_tx_datarate(uint8_t datarate, bool use_default)
kadonotakashi 0:8fdf9a60065b 296 {
kadonotakashi 0:8fdf9a60065b 297 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 298 }
kadonotakashi 0:8fdf9a60065b 299
kadonotakashi 0:8fdf9a60065b 300 bool LoRaPHY::verify_tx_power(uint8_t tx_power)
kadonotakashi 0:8fdf9a60065b 301 {
kadonotakashi 0:8fdf9a60065b 302 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 303 }
kadonotakashi 0:8fdf9a60065b 304
kadonotakashi 0:8fdf9a60065b 305 bool LoRaPHY::verify_duty_cycle(bool cycle)
kadonotakashi 0:8fdf9a60065b 306 {
kadonotakashi 0:8fdf9a60065b 307 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 308 }
kadonotakashi 0:8fdf9a60065b 309
kadonotakashi 0:8fdf9a60065b 310 bool LoRaPHY::verify_nb_join_trials(uint8_t nb_join_trials)
kadonotakashi 0:8fdf9a60065b 311 {
kadonotakashi 0:8fdf9a60065b 312 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 313 }
kadonotakashi 0:8fdf9a60065b 314
kadonotakashi 0:8fdf9a60065b 315 void LoRaPHY::apply_cf_list(const uint8_t *payload, uint8_t size)
kadonotakashi 0:8fdf9a60065b 316 {
kadonotakashi 0:8fdf9a60065b 317 }
kadonotakashi 0:8fdf9a60065b 318
kadonotakashi 0:8fdf9a60065b 319
kadonotakashi 0:8fdf9a60065b 320 bool LoRaPHY::get_next_ADR(bool restore_channel_mask, int8_t &dr_out,
kadonotakashi 0:8fdf9a60065b 321 int8_t &tx_power_out, uint32_t &adr_ack_cnt)
kadonotakashi 0:8fdf9a60065b 322 {
kadonotakashi 0:8fdf9a60065b 323 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 324 }
kadonotakashi 0:8fdf9a60065b 325
kadonotakashi 0:8fdf9a60065b 326 void LoRaPHY::compute_rx_win_params(int8_t datarate, uint8_t min_rx_symbols,
kadonotakashi 0:8fdf9a60065b 327 uint32_t rx_error,
kadonotakashi 0:8fdf9a60065b 328 rx_config_params_t *rx_conf_params)
kadonotakashi 0:8fdf9a60065b 329 {
kadonotakashi 0:8fdf9a60065b 330 }
kadonotakashi 0:8fdf9a60065b 331
kadonotakashi 0:8fdf9a60065b 332 bool LoRaPHY::rx_config(rx_config_params_t *rx_conf)
kadonotakashi 0:8fdf9a60065b 333 {
kadonotakashi 0:8fdf9a60065b 334 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 335 }
kadonotakashi 0:8fdf9a60065b 336
kadonotakashi 0:8fdf9a60065b 337 bool LoRaPHY::tx_config(tx_config_params_t *tx_conf, int8_t *tx_power,
kadonotakashi 0:8fdf9a60065b 338 lorawan_time_t *tx_toa)
kadonotakashi 0:8fdf9a60065b 339 {
kadonotakashi 0:8fdf9a60065b 340 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 341 }
kadonotakashi 0:8fdf9a60065b 342
kadonotakashi 0:8fdf9a60065b 343 uint8_t LoRaPHY::link_ADR_request(adr_req_params_t *link_adr_req,
kadonotakashi 0:8fdf9a60065b 344 int8_t *dr_out, int8_t *tx_power_out,
kadonotakashi 0:8fdf9a60065b 345 uint8_t *nb_rep_out, uint8_t *nb_bytes_processed)
kadonotakashi 0:8fdf9a60065b 346 {
kadonotakashi 0:8fdf9a60065b 347 *nb_bytes_processed = LoRaPHY_stub::linkAdrNbBytesParsed;
kadonotakashi 0:8fdf9a60065b 348 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 349 }
kadonotakashi 0:8fdf9a60065b 350
kadonotakashi 0:8fdf9a60065b 351 uint8_t LoRaPHY::accept_rx_param_setup_req(rx_param_setup_req_t *params)
kadonotakashi 0:8fdf9a60065b 352 {
kadonotakashi 0:8fdf9a60065b 353 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 354 }
kadonotakashi 0:8fdf9a60065b 355
kadonotakashi 0:8fdf9a60065b 356 bool LoRaPHY::accept_tx_param_setup_req(uint8_t ul_dwell_time, uint8_t dl_dwell_time)
kadonotakashi 0:8fdf9a60065b 357 {
kadonotakashi 0:8fdf9a60065b 358 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 359 }
kadonotakashi 0:8fdf9a60065b 360
kadonotakashi 0:8fdf9a60065b 361 int LoRaPHY::lookup_band_for_frequency(uint32_t freq) const
kadonotakashi 0:8fdf9a60065b 362 {
kadonotakashi 0:8fdf9a60065b 363 return LoRaPHY_stub::int_value;
kadonotakashi 0:8fdf9a60065b 364 }
kadonotakashi 0:8fdf9a60065b 365
kadonotakashi 0:8fdf9a60065b 366 bool LoRaPHY::verify_frequency_for_band(uint32_t freq, uint8_t band) const
kadonotakashi 0:8fdf9a60065b 367 {
kadonotakashi 0:8fdf9a60065b 368 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 369 }
kadonotakashi 0:8fdf9a60065b 370
kadonotakashi 0:8fdf9a60065b 371 uint8_t LoRaPHY::dl_channel_request(uint8_t channel_id, uint32_t rx1_frequency)
kadonotakashi 0:8fdf9a60065b 372 {
kadonotakashi 0:8fdf9a60065b 373 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 374 }
kadonotakashi 0:8fdf9a60065b 375
kadonotakashi 0:8fdf9a60065b 376 int8_t LoRaPHY::get_alternate_DR(uint8_t nb_trials)
kadonotakashi 0:8fdf9a60065b 377 {
kadonotakashi 0:8fdf9a60065b 378 return LoRaPHY_stub::int8_value;
kadonotakashi 0:8fdf9a60065b 379 }
kadonotakashi 0:8fdf9a60065b 380
kadonotakashi 0:8fdf9a60065b 381 void LoRaPHY::calculate_backoff(bool joined, bool last_tx_was_join_req, bool dc_enabled, uint8_t channel,
kadonotakashi 0:8fdf9a60065b 382 lorawan_time_t elapsed_time, lorawan_time_t tx_toa)
kadonotakashi 0:8fdf9a60065b 383 {
kadonotakashi 0:8fdf9a60065b 384 }
kadonotakashi 0:8fdf9a60065b 385
kadonotakashi 0:8fdf9a60065b 386 lorawan_status_t LoRaPHY::set_next_channel(channel_selection_params_t *params,
kadonotakashi 0:8fdf9a60065b 387 uint8_t *channel, lorawan_time_t *time,
kadonotakashi 0:8fdf9a60065b 388 lorawan_time_t *aggregate_timeoff)
kadonotakashi 0:8fdf9a60065b 389 {
kadonotakashi 0:8fdf9a60065b 390 return LoRaPHY_stub::lorawan_status_value;
kadonotakashi 0:8fdf9a60065b 391 }
kadonotakashi 0:8fdf9a60065b 392
kadonotakashi 0:8fdf9a60065b 393 lorawan_status_t LoRaPHY::add_channel(const channel_params_t *new_channel,
kadonotakashi 0:8fdf9a60065b 394 uint8_t id)
kadonotakashi 0:8fdf9a60065b 395 {
kadonotakashi 0:8fdf9a60065b 396 return LoRaPHY_stub::lorawan_status_value;
kadonotakashi 0:8fdf9a60065b 397 }
kadonotakashi 0:8fdf9a60065b 398
kadonotakashi 0:8fdf9a60065b 399 bool LoRaPHY::remove_channel(uint8_t channel_id)
kadonotakashi 0:8fdf9a60065b 400 {
kadonotakashi 0:8fdf9a60065b 401 return LoRaPHY_stub::bool_table[LoRaPHY_stub::bool_counter++];
kadonotakashi 0:8fdf9a60065b 402 }
kadonotakashi 0:8fdf9a60065b 403
kadonotakashi 0:8fdf9a60065b 404 void LoRaPHY::set_tx_cont_mode(cw_mode_params_t *params, uint32_t given_frequency)
kadonotakashi 0:8fdf9a60065b 405 {
kadonotakashi 0:8fdf9a60065b 406 }
kadonotakashi 0:8fdf9a60065b 407
kadonotakashi 0:8fdf9a60065b 408 uint8_t LoRaPHY::apply_DR_offset(int8_t dr, int8_t dr_offset)
kadonotakashi 0:8fdf9a60065b 409 {
kadonotakashi 0:8fdf9a60065b 410 return LoRaPHY_stub::uint8_value;
kadonotakashi 0:8fdf9a60065b 411 }
kadonotakashi 0:8fdf9a60065b 412
kadonotakashi 0:8fdf9a60065b 413