Skip to content

Commit

Permalink
Merge branch 'master' of gitee.com:openLuat/LuatOS
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed Oct 27, 2023
2 parents 19b8e57 + 4aef6cc commit 166bfda
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
5 changes: 4 additions & 1 deletion components/camera/luat_camera.h
Expand Up @@ -37,7 +37,6 @@ typedef struct luat_camera_conf
typedef struct
{
size_t camera_speed; //提供给camera时钟频率
void *buf[2]; //2个全图像缓存区指针,780EP需要
uint16_t sensor_width; //camera的最大宽度
uint16_t sensor_height; //camera的最大高度
uint16_t one_buf_height; //1个接收缓存的高度,接收缓存大小=sensor_width * one_buf_height * (1 or 2,only_y=1), 底层根据实际情况会做调整,从而修改这个值,目前废弃
Expand Down Expand Up @@ -95,6 +94,10 @@ int luat_camera_stop(int id);
*/
int luat_camera_close(int id);
int luat_camera_capture(int id, uint8_t quality, const char *path);

int luat_camera_start_with_buffer(int id, void *buf);
void luat_camera_continue_with_buffer(int id, void *buf);

/*
* @brief 扫码库初始化
* @param type 扫码库型号,目前只支持0
Expand Down
21 changes: 14 additions & 7 deletions components/network/adapter/luat_network_adapter.c
Expand Up @@ -2326,15 +2326,22 @@ int network_tx(network_ctrl_t *ctrl, const uint8_t *data, uint32_t len, int flag
}while(ctrl->ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER);
#endif
}
result = mbedtls_ssl_write(ctrl->ssl, data, len);
if (result < 0)

uint32_t done = 0;
while(done < len)
{
DBG("%08x", -result);
ctrl->need_close = 1;
NW_UNLOCK;
return -1;
result = mbedtls_ssl_write(ctrl->ssl, data + done, len - done);
if (result < 0)
{
DBG("%08x", -result);
ctrl->need_close = 1;
NW_UNLOCK;
return -1;
}
done += result;
}
*tx_len = result;

*tx_len = done;
}
else
#endif
Expand Down

0 comments on commit 166bfda

Please sign in to comment.