*
* @post peripheral_gpio_close()
*/
-int peripheral_gpio_open(int gpio_pin, peripheral_gpio_h *gpio);
+EXPORT_API int peripheral_gpio_open(int gpio_pin, peripheral_gpio_h *gpio);
/**
* @platform
*
* @pre peripheral_gpio_open()
*/
-int peripheral_gpio_close(peripheral_gpio_h gpio);
+EXPORT_API int peripheral_gpio_close(peripheral_gpio_h gpio);
/**
* @platform
* @see peripheral_gpio_direction_e
* @see peripheral_gpio_set_edge_mode()
*/
-int peripheral_gpio_set_direction(peripheral_gpio_h gpio, peripheral_gpio_direction_e direction);
+EXPORT_API int peripheral_gpio_set_direction(peripheral_gpio_h gpio, peripheral_gpio_direction_e direction);
/**
* @platform
* @see peripheral_gpio_edge_e
* @see peripheral_gpio_set_direction()
*/
-int peripheral_gpio_set_edge_mode(peripheral_gpio_h gpio, peripheral_gpio_edge_e edge);
+EXPORT_API int peripheral_gpio_set_edge_mode(peripheral_gpio_h gpio, peripheral_gpio_edge_e edge);
/**
* @platform
* @post peripheral_gpio_unset_interrupted_cb()
* @see peripheral_gpio_set_edge_mode()
*/
-int peripheral_gpio_set_interrupted_cb(peripheral_gpio_h gpio, peripheral_gpio_interrupted_cb callback, void *user_data);
+EXPORT_API int peripheral_gpio_set_interrupted_cb(peripheral_gpio_h gpio, peripheral_gpio_interrupted_cb callback, void *user_data);
/**
* @platform
*
* @pre peripheral_gpio_set_interrupted_cb()
*/
-int peripheral_gpio_unset_interrupted_cb(peripheral_gpio_h gpio);
+EXPORT_API int peripheral_gpio_unset_interrupted_cb(peripheral_gpio_h gpio);
/**
* @platform
*
* @see peripheral_gpio_write()
*/
-int peripheral_gpio_read(peripheral_gpio_h gpio, uint32_t *value);
+EXPORT_API int peripheral_gpio_read(peripheral_gpio_h gpio, uint32_t *value);
/**
* @platform
* @see peripheral_gpio_read()
* @see peripheral_gpio_set_direction()
*/
-int peripheral_gpio_write(peripheral_gpio_h gpio, uint32_t value);
+EXPORT_API int peripheral_gpio_write(peripheral_gpio_h gpio, uint32_t value);
/**
* @}
*
* @post peripheral_i2c_close()
*/
-int peripheral_i2c_open(int bus, int address, peripheral_i2c_h *i2c);
+EXPORT_API int peripheral_i2c_open(int bus, int address, peripheral_i2c_h *i2c);
/**
* @brief Enumeration for open flags (bitmask).
*
* @post peripheral_i2c_close()
*/
-int peripheral_i2c_open_flags(int bus, int address, peripheral_open_flags_e flags, peripheral_i2c_h *i2c);
+EXPORT_API int peripheral_i2c_open_flags(int bus, int address, peripheral_open_flags_e flags, peripheral_i2c_h *i2c);
/**
* @platform
*
* @pre peripheral_i2c_open()
*/
-int peripheral_i2c_close(peripheral_i2c_h i2c);
+EXPORT_API int peripheral_i2c_close(peripheral_i2c_h i2c);
/**
* @platform
*
* @see peripheral_i2c_write()
*/
-int peripheral_i2c_read(peripheral_i2c_h i2c, uint8_t *data, uint32_t length);
+EXPORT_API int peripheral_i2c_read(peripheral_i2c_h i2c, uint8_t *data, uint32_t length);
/**
* @platform
*
* @see peripheral_i2c_read()
*/
-int peripheral_i2c_write(peripheral_i2c_h i2c, uint8_t *data, uint32_t length);
+EXPORT_API int peripheral_i2c_write(peripheral_i2c_h i2c, uint8_t *data, uint32_t length);
/**
* @platform
*
* @see peripheral_i2c_write_register_byte()
*/
-int peripheral_i2c_read_register_byte(peripheral_i2c_h i2c, uint8_t reg, uint8_t *data);
+EXPORT_API int peripheral_i2c_read_register_byte(peripheral_i2c_h i2c, uint8_t reg, uint8_t *data);
/**
* @platform
*
* @see peripheral_i2c_read_register_byte()
*/
-int peripheral_i2c_write_register_byte(peripheral_i2c_h i2c, uint8_t reg, uint8_t data);
+EXPORT_API int peripheral_i2c_write_register_byte(peripheral_i2c_h i2c, uint8_t reg, uint8_t data);
/**
* @platform
*
* @see peripheral_i2c_write_register_word()
*/
-int peripheral_i2c_read_register_word(peripheral_i2c_h i2c, uint8_t reg, uint16_t *data);
+EXPORT_API int peripheral_i2c_read_register_word(peripheral_i2c_h i2c, uint8_t reg, uint16_t *data);
/**
* @platform
*
* @see peripheral_i2c_read_register_word()
*/
-int peripheral_i2c_write_register_word(peripheral_i2c_h i2c, uint8_t reg, uint16_t data);
+EXPORT_API int peripheral_i2c_write_register_word(peripheral_i2c_h i2c, uint8_t reg, uint16_t data);
/**
* @}
*
* @post peripheral_pwm_close()
*/
-int peripheral_pwm_open(int chip, int pin, peripheral_pwm_h *pwm);
+EXPORT_API int peripheral_pwm_open(int chip, int pin, peripheral_pwm_h *pwm);
/**
* @platform
*
* @pre peripheral_pwm_open()
*/
-int peripheral_pwm_close(peripheral_pwm_h pwm);
+EXPORT_API int peripheral_pwm_close(peripheral_pwm_h pwm);
/**
* @platform
* @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*/
-int peripheral_pwm_set_period(peripheral_pwm_h pwm, uint32_t period_ns);
+EXPORT_API int peripheral_pwm_set_period(peripheral_pwm_h pwm, uint32_t period_ns);
/**
* @platform
* @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*/
-int peripheral_pwm_set_duty_cycle(peripheral_pwm_h pwm, uint32_t duty_cycle_ns);
+EXPORT_API int peripheral_pwm_set_duty_cycle(peripheral_pwm_h pwm, uint32_t duty_cycle_ns);
/**
* @platform
*
* @see peripheral_pwm_polarity_e
*/
-int peripheral_pwm_set_polarity(peripheral_pwm_h pwm, peripheral_pwm_polarity_e polarity);
+EXPORT_API int peripheral_pwm_set_polarity(peripheral_pwm_h pwm, peripheral_pwm_polarity_e polarity);
/**
* @platform
* @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*/
-int peripheral_pwm_set_enabled(peripheral_pwm_h pwm, bool enabled);
+EXPORT_API int peripheral_pwm_set_enabled(peripheral_pwm_h pwm, bool enabled);
/**
* @}
*
* @post peripheral_adc_close()
*/
-int peripheral_adc_open(int device, int channel, peripheral_adc_h *adc);
+EXPORT_API int peripheral_adc_open(int device, int channel, peripheral_adc_h *adc);
/**
* @platform
*
* @pre peripheral_adc_open()
*/
-int peripheral_adc_close(peripheral_adc_h adc);
+EXPORT_API int peripheral_adc_close(peripheral_adc_h adc);
/**
* @platform
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*
*/
-int peripheral_adc_read(peripheral_adc_h adc, uint32_t *value);
+EXPORT_API int peripheral_adc_read(peripheral_adc_h adc, uint32_t *value);
/**
* @}
*
* @post peripheral_uart_close()
*/
-int peripheral_uart_open(int port, peripheral_uart_h *uart);
+EXPORT_API int peripheral_uart_open(int port, peripheral_uart_h *uart);
/**
* @platform
*
* @post peripheral_uart_close()
*/
-int peripheral_uart_open_flags(int port, peripheral_open_flags_e flags, peripheral_uart_h *uart);
+EXPORT_API int peripheral_uart_open_flags(int port, peripheral_open_flags_e flags, peripheral_uart_h *uart);
/**
* @platform
*
* @pre peripheral_uart_open()
*/
-int peripheral_uart_close(peripheral_uart_h uart);
+EXPORT_API int peripheral_uart_close(peripheral_uart_h uart);
/**
* @platform
*
* @see peripheral_uart_baud_rate_e
*/
-int peripheral_uart_set_baud_rate(peripheral_uart_h uart, peripheral_uart_baud_rate_e baud);
+EXPORT_API int peripheral_uart_set_baud_rate(peripheral_uart_h uart, peripheral_uart_baud_rate_e baud);
/**
* @platform
*
* @see peripheral_uart_byte_size_e
*/
-int peripheral_uart_set_byte_size(peripheral_uart_h uart, peripheral_uart_byte_size_e byte_size);
+EXPORT_API int peripheral_uart_set_byte_size(peripheral_uart_h uart, peripheral_uart_byte_size_e byte_size);
/**
* @platform
*
* @see peripheral_uart_parity_e
*/
-int peripheral_uart_set_parity(peripheral_uart_h uart, peripheral_uart_parity_e parity);
+EXPORT_API int peripheral_uart_set_parity(peripheral_uart_h uart, peripheral_uart_parity_e parity);
/**
* @platform
*
* @see peripheral_uart_stop_bits_e
*/
-int peripheral_uart_set_stop_bits(peripheral_uart_h uart, peripheral_uart_stop_bits_e stop_bits);
+EXPORT_API int peripheral_uart_set_stop_bits(peripheral_uart_h uart, peripheral_uart_stop_bits_e stop_bits);
/**
* @platform
* @see peripheral_uart_software_flow_control_e
* @see peripheral_uart_hardware_flow_control_e
*/
-int peripheral_uart_set_flow_control(peripheral_uart_h uart,
+EXPORT_API int peripheral_uart_set_flow_control(peripheral_uart_h uart,
peripheral_uart_software_flow_control_e sw_flow_control,
peripheral_uart_hardware_flow_control_e hw_flow_control);
*
* @see peripheral_uart_write()
*/
-int peripheral_uart_read(peripheral_uart_h uart, uint8_t *data, uint32_t length);
+EXPORT_API int peripheral_uart_read(peripheral_uart_h uart, uint8_t *data, uint32_t length);
/**
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*
*/
-int peripheral_uart_flush(peripheral_uart_h uart);
+EXPORT_API int peripheral_uart_flush(peripheral_uart_h uart);
/**
* @platform
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*
*/
-int peripheral_uart_drain(peripheral_uart_h uart);
+EXPORT_API int peripheral_uart_drain(peripheral_uart_h uart);
/**
* @platform
*
* @see peripheral_uart_read()
*/
-int peripheral_uart_write(peripheral_uart_h uart, uint8_t *data, uint32_t length);
+EXPORT_API int peripheral_uart_write(peripheral_uart_h uart, uint8_t *data, uint32_t length);
/**
* @}
*
* @post peripheral_spi_close()
*/
-int peripheral_spi_open(int bus, int cs, peripheral_spi_h *spi);
+EXPORT_API int peripheral_spi_open(int bus, int cs, peripheral_spi_h *spi);
/**
* @platform
*
* @see peripheral_spi_open()
*/
-int peripheral_spi_close(peripheral_spi_h spi);
+EXPORT_API int peripheral_spi_close(peripheral_spi_h spi);
/**
* @platform
*
* @see peripheral_spi_mode_e
*/
-int peripheral_spi_set_mode(peripheral_spi_h spi, peripheral_spi_mode_e mode);
+EXPORT_API int peripheral_spi_set_mode(peripheral_spi_h spi, peripheral_spi_mode_e mode);
/**
* @platform
*
* @see peripheral_spi_bit_order_e
*/
-int peripheral_spi_set_bit_order(peripheral_spi_h spi, peripheral_spi_bit_order_e bit_order);
+EXPORT_API int peripheral_spi_set_bit_order(peripheral_spi_h spi, peripheral_spi_bit_order_e bit_order);
/**
* @platform
* @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*/
-int peripheral_spi_set_bits_per_word(peripheral_spi_h spi, uint8_t bits);
+EXPORT_API int peripheral_spi_set_bits_per_word(peripheral_spi_h spi, uint8_t bits);
/**
* @platform
* @retval #PERIPHERAL_ERROR_NOT_SUPPORTED Not supported
* @retval #PERIPHERAL_ERROR_UNKNOWN Unknown internal error
*/
-int peripheral_spi_set_frequency(peripheral_spi_h spi, uint32_t freq_hz);
+EXPORT_API int peripheral_spi_set_frequency(peripheral_spi_h spi, uint32_t freq_hz);
/**
* @platform
*
* @see peripheral_spi_write()
*/
-int peripheral_spi_read(peripheral_spi_h spi, uint8_t *data, uint32_t length);
+EXPORT_API int peripheral_spi_read(peripheral_spi_h spi, uint8_t *data, uint32_t length);
/**
* @platform
*
* @see peripheral_spi_read()
*/
-int peripheral_spi_write(peripheral_spi_h spi, uint8_t *data, uint32_t length);
+EXPORT_API int peripheral_spi_write(peripheral_spi_h spi, uint8_t *data, uint32_t length);
/**
* @platform
* @see peripheral_spi_read()
* @see peripheral_spi_write()
*/
-int peripheral_spi_transfer(peripheral_spi_h spi, uint8_t *txdata, uint8_t *rxdata, uint32_t length);
+EXPORT_API int peripheral_spi_transfer(peripheral_spi_h spi, uint8_t *txdata, uint8_t *rxdata, uint32_t length);
/**
* @}