#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include "pin_defs.h"
#include "utils.h"
#include "driver/gpio.h"
#include "hal/gpio_types.h"
#include "driver/gptimer.h"
#include "driver/gptimer_types.h"
#include "esp_err.h"
#include "esp_check.h"
Go to the source code of this file.
◆ shift_register_cleanup()
Performs cleanup on the shift register contents.
- Parameters
-
| sreg | The handle to use and represent the shift register |
- Returns
- Returns an error if there is an error while cleaning up the general purpose timer, else returns ESP_OK
◆ shift_register_gpio_init()
Initialises the GPIO Pins for the Shift Register Present on the SRA Board.
- Parameters
-
| conf | The handle to use and represent the shift registers. |
- Returns
- Returns an error if NULL shift register is passed or if there is an error during configuring the GPIOs or timer, else returns ESP_OK
◆ shift_register_write_uint32()
| esp_err_t shift_register_write_uint32 |
( |
const shift_register_t * |
sreg, |
|
|
const uint32_t |
data, |
|
|
const bool |
instant |
|
) |
| |
Writes a four bytes to the shift register and latches it (four cascaded shift registers)
- Parameters
-
| sreg | The handle to use and represent the shift registers. |
| data | The data to be sent to the shift register. |
| instant | This parameter defines the way in which the data is latched to the output register, all 8 bits at once or one-by-one. |
- Returns
- Returns an error if a NULL shift register is passed, else returns ESP_OK
◆ shift_register_write_uint8()
| esp_err_t shift_register_write_uint8 |
( |
const shift_register_t * |
sreg, |
|
|
const uint8_t |
data, |
|
|
const bool |
instant |
|
) |
| |
Writes a single byte to the shift register and latches it (single shift register)
- Parameters
-
| sreg | The handle to use and represent the shift registers. |
| data | The data to be sent to the shift register. |
| instant | This parameter defines the way in which the data is latched to the output register, all 8 bits at once or one-by-one. |
- Returns
- Returns an error if a NULL shift register is passed, else returns ESP_OK