bflb.pyi 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. class Camera:
  2. """Camera class for controlling and accessing the BLMCU camera module."""
  3. def __init__(self):
  4. """
  5. Initialize the Camera object, set up the necessary configurations,
  6. and prepare the camera module for operation.
  7. """
  8. def start(self):
  9. """
  10. Start the camera module for capturing frames.
  11. """
  12. def stop(self):
  13. """
  14. Stop the camera module from capturing frames.
  15. """
  16. def get_frame_count(self) -> int:
  17. """
  18. Get the current frame count of the camera module.
  19. Returns:
  20. int: The number of frames currently available.
  21. """
  22. def get_frame_info(self) -> tuple:
  23. """
  24. Get information about the next available frame.
  25. Returns:
  26. tuple: A tuple containing the frame's address (int) and size (int) in bytes.
  27. """
  28. def pop_one_frame(self):
  29. """
  30. Pop the next frame from the camera module's frame buffer.
  31. This should be called after retrieving frame information using get_frame_info().
  32. """
  33. def demo(self):
  34. """
  35. Run a demo of the camera module.
  36. """
  37. def set_callback(self, callback: any):
  38. """
  39. Set a callback function to be called when a frame is available.
  40. Args:
  41. callback (function): The callback function to be called.
  42. """
  43. class Microphone:
  44. """Microphone class for controlling and accessing the BLMCU microphone module."""
  45. def __init__(self):
  46. """
  47. Initialize the Microphone object, set up the necessary configurations,
  48. and prepare the microphone module for operation.
  49. """
  50. def start(self):
  51. """
  52. Start the microphone module for capturing audio data.
  53. """
  54. def stop(self):
  55. """
  56. Stop the microphone module from capturing audio data.
  57. """
  58. def set_callback(self, callback: any):
  59. """
  60. Set a callback function to be called when audio data is available.
  61. Args:
  62. callback (function): The callback function to be called.
  63. """
  64. def demo(self):
  65. """
  66. Run a demo of the microphone module.
  67. """
  68. def get_frame_info(self) -> tuple:
  69. """
  70. Get information about the next available audio frame.
  71. Returns:
  72. tuple: A tuple containing the frame's address (int) and size (int) in bytes.
  73. """