Skip to content

ESP32: New feature: EspError exception, Pulse counter(PCNT), Quadrature encoder(QUAD) #6626

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

Conversation

@IhorNehrutsa
Copy link
Contributor Author

import esp_err

print('help(esp_err.EspError)', help(esp_err.EspError))

raise esp_err.EspError('%d(0x%X) - ESP_ERR_INVALID_ARG' % (esp_err.EspError.ESP_ERR_INVALID_ARG, esp_err.EspError.ESP_ERR_INVALID_ARG))

output is

>>> %Run -c $EDITOR_CONTENT -f pcnt
object <class 'EspError'> is of type type
  ESP_ERR_INVALID_ARG -- 258
  ESP_ERR_INVALID_CRC -- 265
  ESP_ERR_INVALID_MAC -- 267
  ESP_ERR_INVALID_RESPONSE -- 264
  ESP_ERR_INVALID_SIZE -- 260
  ESP_ERR_INVALID_STATE -- 259
  ESP_ERR_INVALID_VERSION -- 266
  ESP_ERR_MESH_BASE -- 16384
  ESP_ERR_NOT_FOUND -- 261
  ESP_ERR_NOT_SUPPORTED -- 262
  ESP_ERR_NO_MEM -- 257
  ESP_ERR_TIMEOUT -- 263
  ESP_ERR_WIFI_BASE -- 12288
  ESP_FAIL -- -1
  ESP_OK -- 0
help(esp_err.EspError) None
Traceback (most recent call last):
  File "<stdin>", line 12, in <module>
EspError: 258(0x102) - ESP_ERR_INVALID_ARG
>>> 

@IhorNehrutsa
Copy link
Contributor Author

WIP: don't merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant