FreeRTOS: FreeRTOS Cellular Library
v1.4.0
FreeRTOS Cellular Library
Loading...
Searching...
No Matches
cellular_config_defaults.h
Go to the documentation of this file.
1
/*
2
* FreeRTOS-Cellular-Interface v1.4.0
3
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4
*
5
* SPDX-License-Identifier: MIT
6
*
7
* Permission is hereby granted, free of charge, to any person obtaining a copy of
8
* this software and associated documentation files (the "Software"), to deal in
9
* the Software without restriction, including without limitation the rights to
10
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11
* the Software, and to permit persons to whom the Software is furnished to do so,
12
* subject to the following conditions:
13
*
14
* The above copyright notice and this permission notice shall be included in all
15
* copies or substantial portions of the Software.
16
*
17
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
19
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
20
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
*
24
* https://www.FreeRTOS.org
25
* https://github.com/FreeRTOS
26
*/
27
40
#ifndef __CELLULAR_CONFIG_DEFAULTS_H__
41
#define __CELLULAR_CONFIG_DEFAULTS_H__
42
43
/* *INDENT-OFF* */
44
#ifdef __cplusplus
45
extern
"C"
{
46
#endif
47
/* *INDENT-ON* */
48
49
/* The macro definition for CELLULAR_DO_NOT_USE_CUSTOM_CONFIG is for Doxygen
50
* documentation only. */
51
62
#ifdef DOXYGEN
63
#define CELLULAR_DO_NOT_USE_CUSTOM_CONFIG
64
#endif
65
72
#ifndef CELLULAR_MCC_MAX_SIZE
73
#define CELLULAR_MCC_MAX_SIZE ( 3U )
74
#endif
75
82
#ifndef CELLULAR_MNC_MAX_SIZE
83
#define CELLULAR_MNC_MAX_SIZE ( 3U )
84
#endif
85
92
#ifndef CELLULAR_ICCID_MAX_SIZE
93
#define CELLULAR_ICCID_MAX_SIZE ( 20U )
94
#endif
95
102
#ifndef CELLULAR_IMSI_MAX_SIZE
103
#define CELLULAR_IMSI_MAX_SIZE ( 15U )
104
#endif
105
112
#ifndef CELLULAR_FW_VERSION_MAX_SIZE
113
#define CELLULAR_FW_VERSION_MAX_SIZE ( 32U )
114
#endif
115
122
#ifndef CELLULAR_HW_VERSION_MAX_SIZE
123
#define CELLULAR_HW_VERSION_MAX_SIZE ( 12U )
124
#endif
125
132
#ifndef CELLULAR_SERIAL_NUM_MAX_SIZE
133
#define CELLULAR_SERIAL_NUM_MAX_SIZE ( 12U )
134
#endif
135
142
#ifndef CELLULAR_IMEI_MAX_SIZE
143
#define CELLULAR_IMEI_MAX_SIZE ( 15U )
144
#endif
145
152
#ifndef CELLULAR_NETWORK_NAME_MAX_SIZE
153
#define CELLULAR_NETWORK_NAME_MAX_SIZE ( 32U )
154
#endif
155
162
#ifndef CELLULAR_APN_MAX_SIZE
163
#define CELLULAR_APN_MAX_SIZE ( 64U )
164
#endif
165
172
#ifndef CELLULAR_PDN_USERNAME_MAX_SIZE
173
#define CELLULAR_PDN_USERNAME_MAX_SIZE ( 32U )
174
#endif
175
182
#ifndef CELLULAR_PDN_PASSWORD_MAX_SIZE
183
#define CELLULAR_PDN_PASSWORD_MAX_SIZE ( 32u )
184
#endif
185
192
#ifndef CELLULAR_IP_ADDRESS_MAX_SIZE
193
#define CELLULAR_IP_ADDRESS_MAX_SIZE ( 40U )
194
#endif
195
202
#ifndef CELLULAR_AT_CMD_MAX_SIZE
203
#define CELLULAR_AT_CMD_MAX_SIZE ( 200U )
204
#endif
205
212
#ifndef CELLULAR_NUM_SOCKET_MAX
213
#define CELLULAR_NUM_SOCKET_MAX ( 12U )
214
#endif
215
222
#ifndef CELLULAR_MANUFACTURE_ID_MAX_SIZE
223
#define CELLULAR_MANUFACTURE_ID_MAX_SIZE ( 20U )
224
#endif
225
232
#ifndef CELLULAR_MODEL_ID_MAX_SIZE
233
#define CELLULAR_MODEL_ID_MAX_SIZE ( 10U )
234
#endif
235
242
#ifndef CELLULAR_EDRX_LIST_MAX_SIZE
243
#define CELLULAR_EDRX_LIST_MAX_SIZE ( 4U )
244
#endif
245
252
#ifndef CELLULAR_PDN_CONTEXT_ID_MIN
253
#define CELLULAR_PDN_CONTEXT_ID_MIN ( 1U )
254
#endif
255
262
#ifndef CELLULAR_PDN_CONTEXT_ID_MAX
263
#define CELLULAR_PDN_CONTEXT_ID_MAX ( 16U )
264
#endif
265
272
#ifndef CELLULAR_MAX_RAT_PRIORITY_COUNT
273
#define CELLULAR_MAX_RAT_PRIORITY_COUNT ( 3U )
274
#endif
275
282
#ifndef CELLULAR_MAX_SEND_DATA_LEN
283
#define CELLULAR_MAX_SEND_DATA_LEN ( 1460U )
284
#endif
285
292
#ifndef CELLULAR_MAX_RECV_DATA_LEN
293
#define CELLULAR_MAX_RECV_DATA_LEN ( 1500U )
294
#endif
295
302
#ifndef CELLULAR_SUPPORT_GETHOSTBYNAME
303
#define CELLULAR_SUPPORT_GETHOSTBYNAME ( 1U )
304
#endif
305
312
#ifndef CELLULAR_COMM_IF_SEND_TIMEOUT_MS
313
#define CELLULAR_COMM_IF_SEND_TIMEOUT_MS ( 1000U )
314
#endif
315
322
#ifndef CELLULAR_COMM_IF_RECV_TIMEOUT_MS
323
#define CELLULAR_COMM_IF_RECV_TIMEOUT_MS ( 1000U )
324
#endif
325
332
#ifndef CELLULAR_CONFIG_STATIC_ALLOCATION_CONTEXT
333
#define CELLULAR_CONFIG_STATIC_ALLOCATION_CONTEXT ( 0U )
334
#endif
335
342
#ifndef CELLULAR_CONFIG_STATIC_COMM_CONTEXT_ALLOCATION
343
#define CELLULAR_CONFIG_STATIC_COMM_CONTEXT_ALLOCATION ( 0U )
344
#endif
345
352
#ifndef CELLULAR_CONFIG_DEFAULT_RAT
353
#define CELLULAR_CONFIG_DEFAULT_RAT ( 8 )
/* Set default RAT to CELLULAR_RAT_CATM1 @ref CellularRat_t. */
354
#endif
355
362
#ifndef CELLULAR_CONFIG_STATIC_SOCKET_CONTEXT_ALLOCATION
363
#define CELLULAR_CONFIG_STATIC_SOCKET_CONTEXT_ALLOCATION ( 0 )
364
#endif
365
376
#ifndef CELLULAR_COMMON_AT_COMMAND_TIMEOUT_MS
377
#define CELLULAR_COMMON_AT_COMMAND_TIMEOUT_MS ( 5000U )
378
#endif
379
388
#ifndef CELLULAR_AT_COMMAND_RAW_TIMEOUT_MS
389
#define CELLULAR_AT_COMMAND_RAW_TIMEOUT_MS ( 5000U )
390
#endif
391
400
#ifndef CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH
401
#define CELLULAR_CONFIG_MAX_PREFIX_STRING_LENGTH ( 32U )
402
#endif
403
418
#ifndef CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR
419
#define CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR( x ) ( ( x ) == '+' )
420
#endif
421
435
#ifndef CELLULAR_CHECK_IS_PREFIX_CHAR
436
#define CELLULAR_CHECK_IS_PREFIX_CHAR( inputChar ) \
437
( ( ( ( int32_t ) isalpha( ( ( int8_t ) ( inputChar ) ) ) ) == 0 ) && \
438
( ( ( int32_t ) isdigit( ( ( int8_t ) ( inputChar ) ) ) ) == 0 ) && \
439
( ( inputChar ) != '_' ) && \
440
( !( CELLULAR_CHECK_IS_PREFIX_LEADING_CHAR( inputChar ) ) ) )
441
#endif
442
451
#ifndef CELLULAR_AT_MAX_STRING_SIZE
452
#define CELLULAR_AT_MAX_STRING_SIZE ( 256U )
453
#endif
454
463
#ifndef CELLULAR_CONFIG_USE_CCID_COMMAND
464
#define CELLULAR_CONFIG_USE_CCID_COMMAND 1
465
#endif
466
473
#ifndef CELLULAR_CONFIG_ASSERT
474
#define CELLULAR_CONFIG_ASSERT( X ) configASSERT( X )
475
#endif
476
486
#ifndef CELLULAR_CONFIG_PLATFORM_FREERTOS
487
#define CELLULAR_CONFIG_PLATFORM_FREERTOS 1
488
#endif
489
490
#if CELLULAR_CONFIG_PLATFORM_FREERTOS
491
#define PlatformQueueHandle_t QueueHandle_t
492
#define PlatformEventBits_t EventBits_t
493
#define PlatformBaseType_t BaseType_t
494
#define PlatformTickType_t TickType_t
495
#define platformTRUE pdTRUE
496
#define platformFALSE pdFALSE
497
#define platformPASS pdPASS
498
#define platformFAIL pdFAIL
499
#define platformMAX_DELAY portMAX_DELAY
500
#define PlatformQueue_Create xQueueCreate
501
#define PlatformQueue_Send xQueueSend
502
#define PlatformQueue_Receive xQueueReceive
503
#define PlatformQueue_Delete vQueueDelete
504
#endif
/* if CELLULAR_CONFIG_PLATFORM_FREERTOS */
505
515
#ifndef CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE
516
#define CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE 1600U
517
#endif
518
533
#ifndef LogError
534
#define LogError( message )
535
#endif
536
551
#ifndef LogWarn
552
#define LogWarn( message )
553
#endif
554
569
#ifndef LogInfo
570
#define LogInfo( message )
571
#endif
572
587
#ifndef LogDebug
588
#define LogDebug( message )
589
#endif
590
591
/* *INDENT-OFF* */
592
#ifdef __cplusplus
593
}
594
#endif
595
/* *INDENT-ON* */
596
597
#endif
/* __CELLULAR_CONFIG_DEFAULTS_H__ */
source
include
cellular_config_defaults.h
Generated by
1.9.6