/src/mongoose/test/driver_mock.c
Line | Count | Source |
1 | 6.10k | static bool mock_init(struct mg_tcpip_if *ifp) { |
2 | 6.10k | (void) ifp; |
3 | 6.10k | return true; |
4 | 6.10k | } |
5 | | |
6 | 7.36k | static size_t mock_tx(const void *buf, size_t len, struct mg_tcpip_if *ifp) { |
7 | 7.36k | (void) buf, (void) len, (void) ifp; |
8 | 7.36k | return len; |
9 | 7.36k | } |
10 | | |
11 | 6.10k | static size_t mock_rx(void *buf, size_t len, struct mg_tcpip_if *ifp) { |
12 | 6.10k | (void) buf, (void) len, (void) ifp; |
13 | 6.10k | return 0; |
14 | 6.10k | } |
15 | | |
16 | 6.10k | static bool mock_poll(struct mg_tcpip_if *ifp, bool s1) { |
17 | 6.10k | (void) ifp; |
18 | 6.10k | return s1; |
19 | 6.10k | } |
20 | | |
21 | | struct mg_tcpip_driver mg_tcpip_driver_mock = {mock_init, mock_tx, mock_rx, mock_poll}; |