Skip to content

Commit 0d08a99

Browse files
authored
Add CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE config (FreeRTOS#173)
* Add CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE config
1 parent 76706e4 commit 0d08a99

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

docs/doxygen/pages.dox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ Some configuration settings are C pre-processor constants, and some are function
196196
@section CELLULAR_CONFIG_PLATFORM_FREERTOS
197197
@copydoc CELLULAR_CONFIG_PLATFORM_FREERTOS
198198

199+
@section CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE
200+
@copydoc CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE
201+
199202
@section CELLULAR_MODEM_NO_EPS_NETWORK
200203
@brief Macro to disable querying evolved packet system (EPS) network registration status in Cellular_CommonGetServiceStatus.<br>
201204
@note Cellular modem porting can define this macro in cellular_config.h to disable this function.<br>

source/include/cellular_config_defaults.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,19 @@
503503
#define PlatformQueue_Delete vQueueDelete
504504
#endif /* if CELLULAR_CONFIG_PLATFORM_FREERTOS */
505505

506+
/**
507+
* @brief Pktio read buffer size.
508+
*
509+
* The pktio read buffer size should be configured to greater than the maximum AT command
510+
* response size, which is typically the TCP socket receive command response packet size.
511+
*
512+
* <b>Possible values:</b>`Any positive integer`<br>
513+
* <b>Default value (if undefined):</b> 1600
514+
*/
515+
#ifndef CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE
516+
#define CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE 1600U
517+
#endif
518+
506519
/**
507520
* @brief Macro that is called in the cellular library for logging "Error" level
508521
* messages.

source/include/private/cellular_common_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
/*-----------------------------------------------------------*/
5050

51-
#define PKTIO_READ_BUFFER_SIZE ( 1600U ) /* This should be larger than TCP packet size. */
51+
#define PKTIO_READ_BUFFER_SIZE ( CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE )
5252
#define PKTIO_WRITE_BUFFER_SIZE ( CELLULAR_AT_CMD_MAX_SIZE )
5353

5454
/*-----------------------------------------------------------*/

0 commit comments

Comments
 (0)