-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AT_USING_SOCKET_SERVER 与 const 的冲突。解决#182引起的 #189
Comments
编译错误: |
at_device.h: struct at_device_class
{
uint16_t class_id; /* AT device class ID */
const struct at_device_ops *device_ops; /* AT device operaiotns */
#ifdef AT_USING_SOCKET
uint32_t socket_num; /* The maximum number of sockets support */
const struct at_socket_ops *socket_ops; /* AT device socket operations */
#endif
rt_slist_t list; /* AT device class list */
}; /* avoid use bottom driver to alloc "socket" */
store_at_socket_temporary = device->class->socket_ops->at_socket;
device->class->socket_ops->at_socket = RT_NULL;
new_sock = alloc_socket_by_device(device, AT_SOCKET_TCP);
if (new_sock == RT_NULL)
{
return;
}
new_sock->type = AT_SOCKET_TCP;
new_sock->state = AT_SOCKET_CONNECT;
/* set AT socket receive data callback function */
new_sock->ops->at_set_event_cb(AT_SOCKET_EVT_RECV, at_recv_notice_cb);
new_sock->ops->at_set_event_cb(AT_SOCKET_EVT_CLOSED, at_closed_notice_cb);
new_sock->ops->at_set_event_cb(AT_SOCKET_EVT_CONNECTED, at_connect_notice_cb);
device->class->socket_ops->at_socket = store_at_socket_temporary; |
直接把store_at_socket_temporary删了,没用 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
最新版本(2022-11-16 19:28:24) 开启了宏定义AT_USING_SOCKET_SERVER 与 atclient 包里的 const struct at_socket_ops socket_ops; / AT device socket operations */
冲突了。
#182
解决了182. 引起了新的问题。
按下葫芦浮起瓢。。。
The text was updated successfully, but these errors were encountered: