Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions template/Board/Corstone-300/vsi/python/arm_vsi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#More details.

import os
import atexit
import logging
import logging.handlers
from os import path
Expand Down Expand Up @@ -222,6 +223,15 @@ def _build_sdsio_request(command: int, sid: int = 0, argument: int = 0, data: by
control_input_factory=False,
)

# Shutdown SDSIO manager on exit
def shutdown():
try:
Stream.shutdown()
except Exception:
logger.error("Failed to shutdown SDSIO manager.")

# Register the shutdown function to be called on exit
atexit.register(shutdown)

## Process command
# @param command requested SDSIO command
Expand Down
10 changes: 10 additions & 0 deletions template/Board/Corstone-320/vsi/python/arm_vsi3.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#More details.

import os
import atexit
import logging
import logging.handlers
from os import path
Expand Down Expand Up @@ -222,6 +223,15 @@ def _build_sdsio_request(command: int, sid: int = 0, argument: int = 0, data: by
control_input_factory=False,
)

# Shutdown SDSIO manager on exit
def shutdown():
try:
Stream.shutdown()
except Exception:
logger.error("Failed to shutdown SDSIO manager.")

# Register the shutdown function to be called on exit
atexit.register(shutdown)

## Process command
# @param command requested SDSIO command
Expand Down
Loading