.. _index:

CosmicSDK Documentation
=======================

Welcome to the official documentation for **CosmicSDK**, the native C++ SDK and C API designed to interface with Binho USB host adapters, Supernova and Pulsar.

CosmicSDK provides high-performance, low-level access to the full feature set of Binho devices, enabling developers to integrate, control, and test hardware across multiple communication protocols with ease and precision.

Whether you're developing custom test automation software, building embedded systems prototypes, or validating device drivers, CosmicSDK offers a clean, extensible, and production-ready interface to accelerate your workflow.


Features
--------

- **Native C++ Integration:** High-performance SDK for direct control of Binho USB host adapters.
- **C and C++ APIs:** Easily adaptable to any programming language you use.
- **Dynamic and Static Libraries:** Choose between dynamic (`.dll/.so`) and static (`.lib/.a`) linking options based on your project's needs.
- **Blocking API Functions:** All API functions are blocking, ensuring operations complete before proceeding to the next step. Optionally, an asynchronous API is available for non-blocking operations.
- **Callback Mechanism:** Register callbacks to handle asynchronous notifications from the host adapters, enabling responsive and event-driven programming.
- **Cross-Platform Support:** Compatible with Windows, macOS, and Linux environments.


What You’ll Find Here
---------------------

This documentation is designed to be your single source of truth for using the CosmicSDK effectively. It includes:

- **Getting Started**: Learn how to download, install, and set up the SDK on Windows, macOS, and Linux.
- **API Reference**:

  - C API
  - C++ (Async and Blocking) APIs
  - Detailed per-protocol modules: I2C, SPI, I3C, UART, GPIO
  
- **Integration Guides**: Step-by-step instructions for integrating CosmicSDK with your projects across all major platforms.
- **Examples**: Practical code examples to help you get up and running quickly.
- **Language Bindings**: Understand how CosmicSDK can be used beyond C and C++, and be integrated into other language platforms such as Python and C#.
- **Changelog & Support**: Version history and customer support resources.


About Binho USB Host Adapters
-----------------------------

CosmicSDK is built specifically for use with:

- |binho pulsar|: A versatile USB Host Adapter supporting I2C, SPI, UART, RS-485, CAN-FD, and GPIO interfaces.
- |binho supernova|: A next-generation USB Host Adapter featuring MIPI I3C support alongside I2C, SPI, UART, and GPIO.

Both devices are ideal for rapid development, hardware validation, and automated testing. For more information, visit |binho|.

.. image:: _static/2023BinhoLogo.png
   :alt: Binho Logo
   :align: center
   :scale: 20%

Let’s get started!

.. toctree::
   :caption: Getting Started
   :maxdepth: 1

   getting_started/download_and_install
   getting_started/prerequisites
   getting_started/examples
   getting_started/integration
   getting_started/version

.. toctree::
   :caption: C/C++ API References
   :maxdepth: 1

   api/api
   api/faq

.. toctree::
   :caption: Language Bindings
   :maxdepth: 1

   language_bindings/bindings

.. toctree::
   :caption: Project Information
   :maxdepth: 1

   info/changelog
   info/support

.. ---------------------------------------------------------------------------
.. External links (HTML raw substitutions)
.. ---------------------------------------------------------------------------

.. |binho| raw:: html
   
   <a href="https://binho.io/"
      target="_blank" rel="noopener noreferrer">
      binho.io
   </a>

.. |binho pulsar| raw:: html
   
   <a href="https://binho.io/test-measurement/products/binho-pulsar/"
      target="_blank" rel="noopener noreferrer">
      Binho Pulsar
   </a>

.. |binho supernova| raw:: html
   
   <a href="https://binho.io/test-measurement/products/binho-supernova/"
      target="_blank" rel="noopener noreferrer">
      Binho Supernova
   </a>