Skip to content

Commit

Permalink
Add CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE config (#173)
Browse files Browse the repository at this point in the history
* Add CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE config
  • Loading branch information
chinglee-iot authored May 30, 2024
1 parent 76706e4 commit 0d08a99
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/doxygen/pages.dox
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ Some configuration settings are C pre-processor constants, and some are function
@section CELLULAR_CONFIG_PLATFORM_FREERTOS
@copydoc CELLULAR_CONFIG_PLATFORM_FREERTOS

@section CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE
@copydoc CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE

@section CELLULAR_MODEM_NO_EPS_NETWORK
@brief Macro to disable querying evolved packet system (EPS) network registration status in Cellular_CommonGetServiceStatus.<br>
@note Cellular modem porting can define this macro in cellular_config.h to disable this function.<br>
Expand Down
13 changes: 13 additions & 0 deletions source/include/cellular_config_defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,19 @@
#define PlatformQueue_Delete vQueueDelete
#endif /* if CELLULAR_CONFIG_PLATFORM_FREERTOS */

/**
* @brief Pktio read buffer size.
*
* The pktio read buffer size should be configured to greater than the maximum AT command
* response size, which is typically the TCP socket receive command response packet size.
*
* <b>Possible values:</b>`Any positive integer`<br>
* <b>Default value (if undefined):</b> 1600
*/
#ifndef CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE
#define CELLULAR_CONFIG_PKTIO_READ_BUFFER_SIZE 1600U
#endif

/**
* @brief Macro that is called in the cellular library for logging "Error" level
* messages.
Expand Down
2 changes: 1 addition & 1 deletion source/include/private/cellular_common_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

/*-----------------------------------------------------------*/

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

/*-----------------------------------------------------------*/
Expand Down

0 comments on commit 0d08a99

Please sign in to comment.