diff --git a/examples/net/webserver/main.go b/examples/net/webserver/main.go index 38163911f..84f0fb4d4 100644 --- a/examples/net/webserver/main.go +++ b/examples/net/webserver/main.go @@ -28,11 +28,6 @@ var ( port string = ":80" ) -var ( - // this is the ESP chip that has the WIFININA firmware flashed on it - adaptor *wifinina.Device -) - var led = machine.LED func main() { @@ -182,43 +177,3 @@ func cnt(w http.ResponseWriter, r *http.Request) { w.Header().Set(`Content-Type`, `application/json`) fmt.Fprintf(w, `{"cnt": %d}`, counter) } - -const retriesBeforeFailure = 3 - -// connect to access point -func connectToAP() { - time.Sleep(2 * time.Second) - var err error - for i := 0; i < retriesBeforeFailure; i++ { - println("Connecting to " + ssid) - err = adaptor.ConnectToAccessPoint(ssid, pass, 10*time.Second) - if err == nil { - println("Connected.") - - return - } - } - - // error connecting to AP - failMessage(err.Error()) -} - -func displayIP() { - ip, _, _, err := adaptor.GetIP() - for ; err != nil; ip, _, _, err = adaptor.GetIP() { - message(err.Error()) - time.Sleep(1 * time.Second) - } - message("IP address: " + ip.String()) -} - -func message(msg string) { - println(msg, "\r") -} - -func failMessage(msg string) { - for { - println(msg) - time.Sleep(1 * time.Second) - } -} diff --git a/netlink/probe/mrkwifi1010.go b/netlink/probe/mrkwifi1010.go index b8907321f..e33e3d1ae 100644 --- a/netlink/probe/mrkwifi1010.go +++ b/netlink/probe/mrkwifi1010.go @@ -4,7 +4,6 @@ package probe import ( "machine" - "time" "tinygo.org/x/drivers/netdev" "tinygo.org/x/drivers/netlink" diff --git a/smoketest.sh b/smoketest.sh index 777401ef3..a3b6d3593 100755 --- a/smoketest.sh +++ b/smoketest.sh @@ -24,9 +24,6 @@ tinygo build -size short -o ./build/test.hex -target=bluepill ./examples/ds1307/ tinygo build -size short -o ./build/test.hex -target=bluepill ./examples/ds1307/time/main.go tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/ds3231/main.go tinygo build -size short -o ./build/test.hex -target=microbit ./examples/easystepper/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/espat/espconsole/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/espat/esphub/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/espat/espstation/main.go tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/flash/console/spi tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/flash/console/qspi tinygo build -size short -o ./build/test.hex -target=microbit ./examples/gc9a01/main.go @@ -81,10 +78,6 @@ tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/vl6 tinygo build -size short -o ./build/test.hex -target=microbit ./examples/waveshare-epd/epd2in13/main.go tinygo build -size short -o ./build/test.hex -target=microbit ./examples/waveshare-epd/epd2in13x/main.go tinygo build -size short -o ./build/test.hex -target=microbit ./examples/waveshare-epd/epd4in2/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/wifinina/ntpclient/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/wifinina/udpstation/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/wifinina/tcpclient/main.go -tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/wifinina/webclient/main.go tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/ws2812 tinygo build -size short -o ./build/test.bin -target=m5stamp-c3 ./examples/ws2812 tinygo build -size short -o ./build/test.hex -target=feather-nrf52840 ./examples/is31fl3731/main.go @@ -113,9 +106,6 @@ tinygo build -size short -o ./build/test.hex -target=pico ./examples/qmi8658c/ma tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/ina260/main.go tinygo build -size short -o ./build/test.hex -target=nucleo-l432kc ./examples/aht20/main.go tinygo build -size short -o ./build/test.hex -target=feather-m4 ./examples/sdcard/console/ -tinygo build -size short -o ./build/test.hex -target=wioterminal ./examples/rtl8720dn/webclient/ -tinygo build -size short -o ./build/test.hex -target=wioterminal ./examples/rtl8720dn/webserver/ -tinygo build -size short -o ./build/test.hex -target=wioterminal ./examples/rtl8720dn/mqttsub/ tinygo build -size short -o ./build/test.hex -target=feather-m4 ./examples/i2csoft/adt7410/ tinygo build -size short -o ./build/test.elf -target=wioterminal ./examples/axp192/m5stack-core2-blinky/ tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/xpt2046/main.go @@ -137,3 +127,17 @@ tinygo build -size short -o ./build/test.hex -target=microbit ./examples/ndir/ma tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/ndir/main_ndir.go tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/mpu9150/main.go tinygo build -size short -o ./build/test.hex -target=macropad-rp2040 ./examples/sh1106/macropad_spi +# network examples (espat) +tinygo build -size short -o ./build/test.hex -target=challenger-rp2040 ./examples/net/ntpclient/ +# network examples (wifinina) +tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/net/http-get/ +tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/net/tcpclient/ +tinygo build -size short -o ./build/test.hex -target=nano-rp2040 ./examples/net/websocket/dial/ +tinygo build -size short -o ./build/test.hex -target=metro-m4-airlift ./examples/net/socket/ +tinygo build -size short -o ./build/test.hex -target=matrixportal-m4 ./examples/net/webstatic/ +tinygo build -size short -o ./build/test.hex -target=arduino-mkrwifi1010 ./examples/net/tlsclient/ +tinygo build -size short -o ./build/test.hex -target=nano-rp2040 ./examples/net/mqttclient/natiu/ +# network examples (rtl8720dn) +tinygo build -size short -o ./build/test.hex -target=wioterminal ./examples/net/webclient/ +tinygo build -size short -o ./build/test.hex -target=wioterminal ./examples/net/webserver/ +tinygo build -size short -o ./build/test.hex -target=wioterminal ./examples/net/mqttclient/paho/ diff --git a/wifinina/commands.go b/wifinina/commands.go deleted file mode 100644 index c43c1dc2d..000000000 --- a/wifinina/commands.go +++ /dev/null @@ -1,67 +0,0 @@ -package wifinina - -type CommandType uint8 - -//go:generate stringer -type=CommandType -trimprefix=Cmd -const ( - CmdStart CommandType = 0xE0 - CmdEnd CommandType = 0xEE - CmdErr CommandType = 0xEF - - CmdSetNet CommandType = 0x10 - CmdSetPassphrase CommandType = 0x11 - CmdSetKey CommandType = 0x12 - CmdSetIPConfig CommandType = 0x14 - CmdSetDNSConfig CommandType = 0x15 - CmdSetHostname CommandType = 0x16 - CmdSetPowerMode CommandType = 0x17 - CmdSetAPNet CommandType = 0x18 - CmdSetAPPassphrase CommandType = 0x19 - CmdSetDebug CommandType = 0x1A - CmdGetTemperature CommandType = 0x1B - CmdGetReasonCode CommandType = 0x1F - // TEST_CMD = 0x13 - - CmdGetConnStatus CommandType = 0x20 - CmdGetIPAddr CommandType = 0x21 - CmdGetMACAddr CommandType = 0x22 - CmdGetCurrSSID CommandType = 0x23 - CmdGetCurrBSSID CommandType = 0x24 - CmdGetCurrRSSI CommandType = 0x25 - CmdGetCurrEncrType CommandType = 0x26 - CmdScanNetworks CommandType = 0x27 - CmdStartServerTCP CommandType = 0x28 - CmdGetStateTCP CommandType = 0x29 - CmdDataSentTCP CommandType = 0x2A - CmdAvailDataTCP CommandType = 0x2B - CmdGetDataTCP CommandType = 0x2C - CmdStartClientTCP CommandType = 0x2D - CmdStopClientTCP CommandType = 0x2E - CmdGetClientStateTCP CommandType = 0x2F - CmdDisconnect CommandType = 0x30 - CmdGetIdxRSSI CommandType = 0x32 - CmdGetIdxEncrType CommandType = 0x33 - CmdReqHostByName CommandType = 0x34 - CmdGetHostByName CommandType = 0x35 - CmdStartScanNetworks CommandType = 0x36 - CmdGetFwVersion CommandType = 0x37 - CmdSendDataUDP CommandType = 0x39 - CmdGetRemoteData CommandType = 0x3A - CmdGetTime CommandType = 0x3B - CmdGetIdxBSSID CommandType = 0x3C - CmdGetIdxChannel CommandType = 0x3D - CmdPing CommandType = 0x3E - CmdGetSocket CommandType = 0x3F - // GET_IDX_SSID_CMD = 0x31, - // GET_TEST_CMD = 0x38 - - // All command with DATA_FLAG 0x40 send a 16bit Len - CmdSendDataTCP CommandType = 0x44 - CmdGetDatabufTCP CommandType = 0x45 - CmdInsertDataBuf CommandType = 0x46 - - // regular format commands - CmdSetPinMode CommandType = 0x50 - CmdSetDigitalWrite CommandType = 0x51 - CmdSetAnalogWrite CommandType = 0x52 -) diff --git a/wifinina/commandtype_string.go b/wifinina/commandtype_string.go deleted file mode 100644 index 09860476f..000000000 --- a/wifinina/commandtype_string.go +++ /dev/null @@ -1,120 +0,0 @@ -//go:build wifidebug - -// Code generated by "stringer -type=CommandType -trimprefix=Cmd"; DO NOT EDIT. - -package wifinina - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[CmdStart-224] - _ = x[CmdEnd-238] - _ = x[CmdErr-239] - _ = x[CmdSetNet-16] - _ = x[CmdSetPassphrase-17] - _ = x[CmdSetKey-18] - _ = x[CmdSetIPConfig-20] - _ = x[CmdSetDNSConfig-21] - _ = x[CmdSetHostname-22] - _ = x[CmdSetPowerMode-23] - _ = x[CmdSetAPNet-24] - _ = x[CmdSetAPPassphrase-25] - _ = x[CmdSetDebug-26] - _ = x[CmdGetTemperature-27] - _ = x[CmdGetReasonCode-31] - _ = x[CmdGetConnStatus-32] - _ = x[CmdGetIPAddr-33] - _ = x[CmdGetMACAddr-34] - _ = x[CmdGetCurrSSID-35] - _ = x[CmdGetCurrBSSID-36] - _ = x[CmdGetCurrRSSI-37] - _ = x[CmdGetCurrEncrType-38] - _ = x[CmdScanNetworks-39] - _ = x[CmdStartServerTCP-40] - _ = x[CmdGetStateTCP-41] - _ = x[CmdDataSentTCP-42] - _ = x[CmdAvailDataTCP-43] - _ = x[CmdGetDataTCP-44] - _ = x[CmdStartClientTCP-45] - _ = x[CmdStopClientTCP-46] - _ = x[CmdGetClientStateTCP-47] - _ = x[CmdDisconnect-48] - _ = x[CmdGetIdxRSSI-50] - _ = x[CmdGetIdxEncrType-51] - _ = x[CmdReqHostByName-52] - _ = x[CmdGetHostByName-53] - _ = x[CmdStartScanNetworks-54] - _ = x[CmdGetFwVersion-55] - _ = x[CmdSendDataUDP-57] - _ = x[CmdGetRemoteData-58] - _ = x[CmdGetTime-59] - _ = x[CmdGetIdxBSSID-60] - _ = x[CmdGetIdxChannel-61] - _ = x[CmdPing-62] - _ = x[CmdGetSocket-63] - _ = x[CmdSendDataTCP-68] - _ = x[CmdGetDatabufTCP-69] - _ = x[CmdInsertDataBuf-70] - _ = x[CmdSetPinMode-80] - _ = x[CmdSetDigitalWrite-81] - _ = x[CmdSetAnalogWrite-82] -} - -const ( - _CommandType_name_0 = "SetNetSetPassphraseSetKey" - _CommandType_name_1 = "SetIPConfigSetDNSConfigSetHostnameSetPowerModeSetAPNetSetAPPassphraseSetDebugGetTemperature" - _CommandType_name_2 = "GetReasonCodeGetConnStatusGetIPAddrGetMACAddrGetCurrSSIDGetCurrBSSIDGetCurrRSSIGetCurrEncrTypeScanNetworksStartServerTCPGetStateTCPDataSentTCPAvailDataTCPGetDataTCPStartClientTCPStopClientTCPGetClientStateTCPDisconnect" - _CommandType_name_3 = "GetIdxRSSIGetIdxEncrTypeReqHostByNameGetHostByNameStartScanNetworksGetFwVersion" - _CommandType_name_4 = "SendDataUDPGetRemoteDataGetTimeGetIdxBSSIDGetIdxChannelPingGetSocket" - _CommandType_name_5 = "SendDataTCPGetDatabufTCPInsertDataBuf" - _CommandType_name_6 = "SetPinModeSetDigitalWriteSetAnalogWrite" - _CommandType_name_7 = "Start" - _CommandType_name_8 = "EndErr" -) - -var ( - _CommandType_index_0 = [...]uint8{0, 6, 19, 25} - _CommandType_index_1 = [...]uint8{0, 11, 23, 34, 46, 54, 69, 77, 91} - _CommandType_index_2 = [...]uint8{0, 13, 26, 35, 45, 56, 68, 79, 94, 106, 120, 131, 142, 154, 164, 178, 191, 208, 218} - _CommandType_index_3 = [...]uint8{0, 10, 24, 37, 50, 67, 79} - _CommandType_index_4 = [...]uint8{0, 11, 24, 31, 42, 55, 59, 68} - _CommandType_index_5 = [...]uint8{0, 11, 24, 37} - _CommandType_index_6 = [...]uint8{0, 10, 25, 39} - _CommandType_index_8 = [...]uint8{0, 3, 6} -) - -func (i CommandType) String() string { - switch { - case 16 <= i && i <= 18: - i -= 16 - return _CommandType_name_0[_CommandType_index_0[i]:_CommandType_index_0[i+1]] - case 20 <= i && i <= 27: - i -= 20 - return _CommandType_name_1[_CommandType_index_1[i]:_CommandType_index_1[i+1]] - case 31 <= i && i <= 48: - i -= 31 - return _CommandType_name_2[_CommandType_index_2[i]:_CommandType_index_2[i+1]] - case 50 <= i && i <= 55: - i -= 50 - return _CommandType_name_3[_CommandType_index_3[i]:_CommandType_index_3[i+1]] - case 57 <= i && i <= 63: - i -= 57 - return _CommandType_name_4[_CommandType_index_4[i]:_CommandType_index_4[i+1]] - case 68 <= i && i <= 70: - i -= 68 - return _CommandType_name_5[_CommandType_index_5[i]:_CommandType_index_5[i+1]] - case 80 <= i && i <= 82: - i -= 80 - return _CommandType_name_6[_CommandType_index_6[i]:_CommandType_index_6[i+1]] - case i == 224: - return _CommandType_name_7 - case 238 <= i && i <= 239: - i -= 238 - return _CommandType_name_8[_CommandType_index_8[i]:_CommandType_index_8[i+1]] - default: - return "CommandType(" + strconv.FormatInt(int64(i), 10) + ")" - } -} diff --git a/wifinina/connectionstatus_string.go b/wifinina/connectionstatus_string.go deleted file mode 100644 index 7e7f513af..000000000 --- a/wifinina/connectionstatus_string.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build wifidebug - -// Code generated by "stringer -type=ConnectionStatus -trimprefix=Status"; DO NOT EDIT. - -package wifinina - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[StatusNoShield-255] - _ = x[StatusIdle-0] - _ = x[StatusNoSSIDAvail-1] - _ = x[StatusScanCompleted-2] - _ = x[StatusConnected-3] - _ = x[StatusConnectFailed-4] - _ = x[StatusConnectionLost-5] - _ = x[StatusDisconnected-6] -} - -const ( - _ConnectionStatus_name_0 = "IdleNoSSIDAvailScanCompletedConnectedConnectFailedConnectionLostDisconnected" - _ConnectionStatus_name_1 = "NoShield" -) - -var ( - _ConnectionStatus_index_0 = [...]uint8{0, 4, 15, 28, 37, 50, 64, 76} -) - -func (i ConnectionStatus) String() string { - switch { - case i <= 6: - return _ConnectionStatus_name_0[_ConnectionStatus_index_0[i]:_ConnectionStatus_index_0[i+1]] - case i == 255: - return _ConnectionStatus_name_1 - default: - return "ConnectionStatus(" + strconv.FormatInt(int64(i), 10) + ")" - } -} diff --git a/wifinina/encryptiontype_string.go b/wifinina/encryptiontype_string.go deleted file mode 100644 index bb3e733f8..000000000 --- a/wifinina/encryptiontype_string.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build wifidebug - -// Code generated by "stringer -type=EncryptionType -trimprefix=EncType"; DO NOT EDIT. - -package wifinina - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[EncTypeTKIP-2] - _ = x[EncTypeCCMP-4] - _ = x[EncTypeWEP-5] - _ = x[EncTypeNone-7] - _ = x[EncTypeAuto-8] -} - -const ( - _EncryptionType_name_0 = "TKIP" - _EncryptionType_name_1 = "CCMPWEP" - _EncryptionType_name_2 = "NoneAuto" -) - -var ( - _EncryptionType_index_1 = [...]uint8{0, 4, 7} - _EncryptionType_index_2 = [...]uint8{0, 4, 8} -) - -func (i EncryptionType) String() string { - switch { - case i == 2: - return _EncryptionType_name_0 - case 4 <= i && i <= 5: - i -= 4 - return _EncryptionType_name_1[_EncryptionType_index_1[i]:_EncryptionType_index_1[i+1]] - case 7 <= i && i <= 8: - i -= 7 - return _EncryptionType_name_2[_EncryptionType_index_2[i]:_EncryptionType_index_2[i+1]] - default: - return "EncryptionType(" + strconv.FormatInt(int64(i), 10) + ")" - } -} diff --git a/wifinina/error_string.go b/wifinina/error_string.go deleted file mode 100644 index 51a001715..000000000 --- a/wifinina/error_string.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by "stringer -type=Error -trimprefix=Err"; DO NOT EDIT. - -package wifinina - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[ErrTimeoutChipReady-1] - _ = x[ErrTimeoutChipSelect-2] - _ = x[ErrCheckStartCmd-3] - _ = x[ErrWaitRsp-4] - _ = x[ErrUnexpectedLength-224] - _ = x[ErrNoParamsReturned-225] - _ = x[ErrIncorrectSentinel-226] - _ = x[ErrCmdErrorReceived-239] - _ = x[ErrNotImplemented-240] - _ = x[ErrUnknownHost-241] - _ = x[ErrSocketAlreadySet-242] - _ = x[ErrConnectionTimeout-243] - _ = x[ErrNoData-244] - _ = x[ErrDataNotWritten-245] - _ = x[ErrCheckDataError-246] - _ = x[ErrBufferTooSmall-247] - _ = x[ErrNoSocketAvail-255] -} - -const ( - _Error_name_0 = "TimeoutChipReadyTimeoutChipSelectCheckStartCmdWaitRsp" - _Error_name_1 = "UnexpectedLengthNoParamsReturnedIncorrectSentinel" - _Error_name_2 = "CmdErrorReceivedNotImplementedUnknownHostSocketAlreadySetConnectionTimeoutNoDataDataNotWrittenCheckDataErrorBufferTooSmall" - _Error_name_3 = "NoSocketAvail" -) - -var ( - _Error_index_0 = [...]uint8{0, 16, 33, 46, 53} - _Error_index_1 = [...]uint8{0, 16, 32, 49} - _Error_index_2 = [...]uint8{0, 16, 30, 41, 57, 74, 80, 94, 108, 122} -) - -func (i Error) String() string { - switch { - case 1 <= i && i <= 4: - i -= 1 - return _Error_name_0[_Error_index_0[i]:_Error_index_0[i+1]] - case 224 <= i && i <= 226: - i -= 224 - return _Error_name_1[_Error_index_1[i]:_Error_index_1[i+1]] - case 239 <= i && i <= 247: - i -= 239 - return _Error_name_2[_Error_index_2[i]:_Error_index_2[i+1]] - case i == 255: - return _Error_name_3 - default: - return "Error(" + strconv.FormatInt(int64(i), 10) + ")" - } -} diff --git a/wifinina/nodebug.go b/wifinina/nodebug.go deleted file mode 100644 index 78cd24310..000000000 --- a/wifinina/nodebug.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build !wifidebug - -package wifinina - -var _debug = false diff --git a/wifinina/status.go b/wifinina/status.go deleted file mode 100644 index fc2e3bf83..000000000 --- a/wifinina/status.go +++ /dev/null @@ -1,75 +0,0 @@ -package wifinina - -type ConnectionStatus uint8 - -//go:generate stringer -type=ConnectionStatus -trimprefix=Status -const ( - StatusNoShield ConnectionStatus = 255 - StatusIdle ConnectionStatus = 0 - StatusNoSSIDAvail ConnectionStatus = 1 - StatusScanCompleted ConnectionStatus = 2 - StatusConnected ConnectionStatus = 3 - StatusConnectFailed ConnectionStatus = 4 - StatusConnectionLost ConnectionStatus = 5 - StatusDisconnected ConnectionStatus = 6 -) - -// Default state value for Wifi state field -// #define NA_STATE -1 - -type EncryptionType uint8 - -//go:generate stringer -type=EncryptionType -trimprefix=EncType -const ( - EncTypeTKIP EncryptionType = 2 - EncTypeCCMP EncryptionType = 4 - EncTypeWEP EncryptionType = 5 - EncTypeNone EncryptionType = 7 - EncTypeAuto EncryptionType = 8 -) - -type TCPState uint8 - -//go:generate stringer -type=TCPState -trimprefix=TCPState -const ( - TCPStateClosed TCPState = 0 - TCPStateListen TCPState = 1 - TCPStateSynSent TCPState = 2 - TCPStateSynRcvd TCPState = 3 - TCPStateEstablished TCPState = 4 - TCPStateFinWait1 TCPState = 5 - TCPStateFinWait2 TCPState = 6 - TCPStateCloseWait TCPState = 7 - TCPStateClosing TCPState = 8 - TCPStateLastACK TCPState = 9 - TCPStateTimeWait TCPState = 10 -) - -type Error uint8 - -func (err Error) Error() string { - return "wifinina error: " + err.String() -} - -//go:generate stringer -type=Error -trimprefix=Err -const ( - ErrTimeoutChipReady Error = 0x01 - ErrTimeoutChipSelect Error = 0x02 - ErrCheckStartCmd Error = 0x03 - ErrWaitRsp Error = 0x04 - ErrUnexpectedLength Error = 0xE0 - ErrNoParamsReturned Error = 0xE1 - ErrIncorrectSentinel Error = 0xE2 - ErrCmdErrorReceived Error = 0xEF - ErrNotImplemented Error = 0xF0 - ErrUnknownHost Error = 0xF1 - ErrSocketAlreadySet Error = 0xF2 - ErrConnectionTimeout Error = 0xF3 - ErrNoData Error = 0xF4 - ErrDataNotWritten Error = 0xF5 - ErrCheckDataError Error = 0xF6 - ErrBufferTooSmall Error = 0xF7 - ErrNoSocketAvail Error = 0xFF - - NoSocketAvail uint8 = 0xFF -) diff --git a/wifinina/tcpstate_string.go b/wifinina/tcpstate_string.go deleted file mode 100644 index 52b6fc18e..000000000 --- a/wifinina/tcpstate_string.go +++ /dev/null @@ -1,35 +0,0 @@ -//go:build wifidebug - -// Code generated by "stringer -type=TCPState -trimprefix=TCPState"; DO NOT EDIT. - -package wifinina - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[TCPStateClosed-0] - _ = x[TCPStateListen-1] - _ = x[TCPStateSynSent-2] - _ = x[TCPStateSynRcvd-3] - _ = x[TCPStateEstablished-4] - _ = x[TCPStateFinWait1-5] - _ = x[TCPStateFinWait2-6] - _ = x[TCPStateCloseWait-7] - _ = x[TCPStateClosing-8] - _ = x[TCPStateLastACK-9] - _ = x[TCPStateTimeWait-10] -} - -const _TCPState_name = "ClosedListenSynSentSynRcvdEstablishedFinWait1FinWait2CloseWaitClosingLastACKTimeWait" - -var _TCPState_index = [...]uint8{0, 6, 12, 19, 26, 37, 45, 53, 62, 69, 76, 84} - -func (i TCPState) String() string { - if i >= TCPState(len(_TCPState_index)-1) { - return "TCPState(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _TCPState_name[_TCPState_index[i]:_TCPState_index[i+1]] -}