Skip to content

Commit 741044c

Browse files
committed
HAL API requirements updates after review
1 parent 0798c6d commit 741044c

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

hal/analogin_api.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ typedef struct analogin_s analogin_t;
3737
* \defgroup hal_analogin Analogin hal functions
3838
*
3939
* # Defined behaviour
40-
* * The function ::analogin_init initializes the analogin peripheral
41-
* * The function ::analogin_read reads the input voltage, represented as a float in the range [0.0, 1.0]
42-
* * The function ::analogin_read_u16 reads the value from analogin pin, represented as an unsigned 16bit value
40+
* * The function ::analogin_init initializes the analogin_t control structure
41+
* * The function ::analogin_read reads the input voltage, represented as a float in the range [0.0 (GND), 1.0 (VCC)]
42+
* * The function ::analogin_read_u16 reads the value from analogin pin, represented as an unsigned 16bit value [0.0 (GND), MAX_UINT16 (VCC)]
43+
* * The accuracy of the ADC is +/- 10%
44+
* * The ADC operations ::analogin_read, ::analogin_read_u16 take less than 20us to complete
4345
*
4446
* # Undefined behaviour
4547
*

hal/analogout_api.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ typedef struct dac_s dac_t;
3737
* \defgroup hal_analogout Analogout hal functions
3838
*
3939
* # Defined behaviour
40-
* * The function ::analogout_init initializes the analogin peripheral
41-
* * The function ::analogout_write sets the output voltage, specified as a percentage (float) in range [0.0, 1.0]
42-
* * The function ::analogout_write_u16 sets the output voltage, specified as unsigned 16-bit value
43-
* * The function ::analogout_read reads the current voltage value on the pin and returns a floating-point value representing the current voltage in range [0.0, 1.0]
44-
* * The function ::analogout_read_u16 reads the current voltage value on the pin and returns the output voltage, specified as unsigned 16-bit value
40+
* * The function ::analogout_init initializes the dac_t control structure
41+
* * The function ::analogout_write sets the output voltage, specified as a percentage (float) in range [0.0 (GND), 1.0 (VCC)]
42+
* * The function ::analogout_write_u16 sets the output voltage, specified as unsigned 16-bit value [0 (GND), MAX_UINT16 (VCC)]
43+
* * The function ::analogout_read reads the current voltage value on the pin and returns a floating-point value representing the current voltage in range [0.0 (GND), 1.0 (VCC)]
44+
* * The function ::analogout_read_u16 reads the current voltage value on the pin and returns the output voltage, specified as unsigned 16-bit value [0 (GND), MAX_UINT16 (VCC)]
45+
* * The accuracy of the DAC is +/- 10%
46+
* * The DAC operations ::analogout_write, ::analogout_write_u16, ::analogout_read, ::analogout_read_u16 take less than 20us to complete
4547
* * The function ::analogout_free releases the analogout object
4648
*
4749
* # Undefined behaviour

hal/gpio_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ extern "C" {
4444
* * ::gpio_init_out inits the pin as an output, with predefined output value 0
4545
* * ::gpio_init_out_ex inits the pin as an output and sets the output value
4646
* * ::gpio_init_inout inits the pin to be input/output and set pin mode and value
47+
* * The GPIO operations ::gpio_write, ::gpio_read take less than 20us to complete
4748
*
4849
* # Undefined behavior
4950
* * Calling any ::gpio_mode, ::gpio_dir, ::gpio_write or ::gpio_read on a gpio_t object that was initialized

hal/i2c_api.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ extern "C" {
7272
* \defgroup hal_GeneralI2C I2C Configuration Functions
7373
*
7474
* # Defined behavior
75-
* * ::i2c_init initialize the I2C peripheral
76-
* * ::i2c_init sets the default parameters for I2C peripheral
75+
* * ::i2c_init initializes i2c_t control structure
7776
* * ::i2c_init configures the pins used by I2C
7877
* * ::i2c_frequency configure the I2C frequency
7978
* * ::i2c_start sends START command

hal/pwmout_api.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef struct pwmout_s pwmout_t;
3737
* \defgroup hal_pwmout Pwmout hal functions
3838
*
3939
* # Defined behavior
40-
* * ::pwmout_init initializes the pwm out peripheral and configures the pin
40+
* * ::pwmout_init initializes the pwmout_t control structure
4141
* * ::pwmout_free deinitializes the pwmout object
4242
* * ::pwmout_write sets the output duty-cycle in range <0.0f, 1.0f>
4343
* * ::pwmout_read returns the current float-point output duty-cycle in range <0.0f, 1.0f>
@@ -47,6 +47,9 @@ typedef struct pwmout_s pwmout_t;
4747
* * ::pwmout_pulsewidth sets the PWM pulsewidth specified in seconds, keeping the period the same
4848
* * ::pwmout_pulsewidth_ms sets the PWM pulsewidth specified in miliseconds, keeping the period the same
4949
* * ::pwmout_pulsewidth_us sets the PWM pulsewidth specified in microseconds, keeping the period the same
50+
* * The accuracy of the PWM is +/- 10%
51+
* * The PWM operations ::pwmout_write, ::pwmout_read, ::pwmout_read, ::pwmout_period_ms, ::pwmout_period_us
52+
* ::pwmout_pulsewidth, ::pwmout_pulsewidth_ms, ::pwmout_pulsewidth_us take less than 20us to complete
5053
*
5154
* # Undefined behavior
5255
* * Calling other function before ::pwmout_init

hal/spi_api.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ extern "C" {
6161
* \defgroup hal_GeneralSPI SPI Configuration Functions
6262
*
6363
* # Defined behavior
64-
* * ::spi_init initialize the SPI peripheral
64+
* * ::spi_init initializes the spi_t control structure
6565
* * ::spi_init configures the pins used by SPI
66-
* * ::spi_init sets a default format and frequency
67-
* * ::spi_init enables the peripheral
6866
* * ::spi_free returns the pins owned by the SPI object to their reset state
6967
* * ::spi_format sets the number of bits per frame
7068
* * ::spi_format configures clock polarity and phase

0 commit comments

Comments
 (0)