...
 
Commits (1)
......@@ -51,10 +51,28 @@ struct PCGPIO_Properties {
char port_name[32];
};
/**
* @brief Initialize a PCGPIO_Properties structure, and bind it to its corresponding port and interrupts.
*
* Interrupt functions may NOT be shared between two PCGPIO_Properties structures, and a PCGPIO_Properties may
* not be initialized twice.
*/
enum PCGPIO_Status PCGPIO_Init(struct PCGPIO_Properties *const properties, char *port_name,
void(*callback_handler)(struct PCGPIO_Properties *properties, struct PCGPIO_Callback callback),
void(*error_handler)(struct PCGPIO_Properties *properties, enum PCGPIO_Status status));
/**
* @brief Transmit a message on the serial bus with the properties specified by <i>method.</i>
*
* This function is for advanced users. Normally, it is best to use method-specific functions:
* - @ref PCGPIO_RequestMCUID
* - @ref PCGPIO_IOConfig
* - @ref PCGPIO_WriteDigital
* - @ref PCGPIO_WriteAnalog
* - @ref PCGPIO_ReadDigital
* - @ref PCGPIO_ReadAnalog
* - @ref PCPGIO_GetPinConfig
*/
enum PCGPIO_Status PCGPIO_TransmitMethod(struct PCGPIO_Properties *const properties, struct PCGPIO_Method *const method);
enum PCGPIO_Status PCGPIO_RequestMCUID(struct PCGPIO_Properties *const properties);
......