+++ /dev/null
-
-import log
-import slip
-from machine import UART
-class slipServiceInit:
- AP = 0 # SLIP_INNER
- STA = 1 # SLIP_OUTER
- def __init__(self, uart=UART.UART4, mode=AP):
- self.__uart = uart
- self.__mode = mode
- slip.destroy()
- print('slip uart={0}'.format (self.__uart))
-
- ret = slip.construct(self.__uart, self.__mode, 0)
- if ret != 0:
- print('slip netif construct fail')
- else:
- print('slip netif construct success')
-
-slipservice = slipServiceInit()
\ No newline at end of file