41 #ifndef __ALT_GPIO_H__ 42 #define __ALT_GPIO_H__ 51 #define ALT_GPIO_BITMASK 0x1FFFFFFF 59 #ifndef ALT_GPIO_DATAREAD_TEST_MODE 60 #define ALT_GPIO_DATAREAD_TEST_MODE false 306 ALT_GPIO_BIT29 = ALT_TWO_TO_POW29,
307 ALT_GPIO_BIT30 = ALT_TWO_TO_POW30,
308 ALT_GPIO_BIT31 = (int32_t) (1UL<<31),
310 ALT_GPIO_BITNUM_MAX = (28),
311 ALT_GPIO_BIT_MAX = (1 << ALT_GPIO_BITNUM_MAX),
312 ALT_END_OF_GPIO_PORT_SIGNALS = (32)
358 uint32_t mask, uint32_t
config);
402 uint32_t mask, uint32_t val);
457 uint32_t mask, uint32_t
config);
504 uint32_t mask, uint32_t
config);
562 uint32_t mask, uint32_t
config);
738 uint32_t mask, uint32_t val);
999 ALT_END_OF_GPIO_SIGNALS = -1,
1000 ALT_LAST_VALID_GPIO_BIT = ALT_HLGPI_15
Definition: alt_generalpurpose_io.h:922
Definition: alt_generalpurpose_io.h:884
Definition: alt_generalpurpose_io.h:902
Definition: alt_generalpurpose_io.h:968
Definition: alt_generalpurpose_io.h:990
Definition: alt_generalpurpose_io.h:275
ALT_GPIO_PORTBIT_t alt_gpio_bit_to_port_pin(ALT_GPIO_1BIT_t pin_num)
Definition: alt_generalpurpose_io.c:748
Definition: alt_generalpurpose_io.h:211
ALT_GPIO_PIN_TYPE_e
Definition: alt_generalpurpose_io.h:127
Definition: deflate.c:115
Definition: alt_generalpurpose_io.h:840
Definition: alt_generalpurpose_io.h:864
ALT_STATUS_CODE alt_gpio_group_config_get2(ALT_GPIO_1BIT_t *pinid_array, ALT_GPIO_CONFIG_RECORD_t *config_array, uint32_t len)
Definition: alt_generalpurpose_io.c:702
ALT_GPIO_PIN_DATA_t data
Definition: alt_generalpurpose_io.h:1028
ALT_GPIO_PIN_TYPE_t type
Definition: alt_generalpurpose_io.h:1019
Definition: alt_generalpurpose_io.h:984
Definition: alt_generalpurpose_io.h:904
uint32_t alt_gpio_port_debounce_get(ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
Definition: alt_generalpurpose_io.c:290
Definition: alt_generalpurpose_io.h:924
Definition: alt_generalpurpose_io.h:277
Definition: alt_generalpurpose_io.h:940
Definition: alt_generalpurpose_io.h:916
ALT_STATUS_CODE alt_gpio_uninit(void)
Definition: alt_generalpurpose_io.c:82
Definition: alt_generalpurpose_io.h:273
ALT_GPIO_1BIT_t alt_gpio_port_pin_to_bit(ALT_GPIO_PORT_t pid, uint32_t bitmask)
Definition: alt_generalpurpose_io.c:764
Definition: alt_generalpurpose_io.h:926
ALT_GPIO_1BIT_e
Definition: alt_generalpurpose_io.h:813
ALT_GPIO_PIN_DIR_t direction
Definition: alt_generalpurpose_io.h:1016
Definition: alt_generalpurpose_io.h:305
Definition: alt_generalpurpose_io.h:146
ALT_STATUS_CODE alt_gpio_port_int_pol_set(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t config)
Definition: alt_generalpurpose_io.c:225
Definition: alt_generalpurpose_io.h:854
Definition: alt_generalpurpose_io.h:970
Definition: alt_generalpurpose_io.h:856
ALT_STATUS_CODE alt_gpio_init(void)
Definition: alt_generalpurpose_io.c:66
enum ALT_GPIO_PORTBIT_e ALT_GPIO_PORTBIT_t
ALT_STATUS_CODE alt_gpio_group_config_get(ALT_GPIO_CONFIG_RECORD_t *config_array, uint32_t len)
Definition: alt_generalpurpose_io.c:670
struct ALT_GPIO_CONFIG_RECORD_s ALT_GPIO_CONFIG_RECORD_t
ALT_GPIO_PIN_DIR_e
Definition: alt_generalpurpose_io.h:113
Definition: alt_generalpurpose_io.h:832
Definition: alt_generalpurpose_io.h:928
Definition: alt_generalpurpose_io.h:898
ALT_STATUS_CODE alt_gpio_port_int_mask_set(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t val)
Definition: alt_generalpurpose_io.c:458
uint32_t alt_gpio_port_datadir_get(ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
Definition: alt_generalpurpose_io.c:119
Definition: alt_generalpurpose_io.h:165
ALT_GPIO_PORT_e
Definition: alt_generalpurpose_io.h:206
Definition: alt_generalpurpose_io.h:918
ALT_STATUS_CODE alt_gpio_port_int_disable(ALT_GPIO_PORT_t gpio_pid, uint32_t config)
Definition: alt_generalpurpose_io.c:419
Definition: alt_generalpurpose_io.h:896
Definition: alt_generalpurpose_io.h:950
Definition: alt_generalpurpose_io.h:297
Definition: alt_generalpurpose_io.h:976
uint32_t alt_gpio_port_data_read(ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
Definition: alt_generalpurpose_io.c:165
Definition: alt_generalpurpose_io.h:936
uint32_t alt_gpio_port_int_type_get(ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
Definition: alt_generalpurpose_io.c:205
ALT_STATUS_CODE alt_gpio_port_int_status_clear(ALT_GPIO_PORT_t gpio_pid, uint32_t clrmask)
Definition: alt_generalpurpose_io.c:514
ALT_GPIO_PIN_SYNC_e
Definition: alt_generalpurpose_io.h:178
Definition: alt_generalpurpose_io.h:303
ALT_GPIO_PORT_t alt_gpio_bit_to_pid(ALT_GPIO_1BIT_t pin_num)
Definition: alt_generalpurpose_io.c:732
ALT_STATUS_CODE alt_gpio_port_int_enable(ALT_GPIO_PORT_t gpio_pid, uint32_t config)
Definition: alt_generalpurpose_io.c:400
Definition: alt_generalpurpose_io.h:942
Definition: alt_generalpurpose_io.h:263
ALT_GPIO_PIN_POL_e
Definition: alt_generalpurpose_io.h:142
ALT_GPIO_PIN_DEBOUNCE_e
Definition: alt_generalpurpose_io.h:162
Definition: alt_generalpurpose_io.h:271
Definition: alt_generalpurpose_io.h:858
ALT_STATUS_CODE alt_gpio_port_debounce_set(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t config)
Definition: alt_generalpurpose_io.c:268
Definition: alt_generalpurpose_io.h:289
Definition: alt_generalpurpose_io.h:301
Definition: alt_generalpurpose_io.h:862
Definition: alt_generalpurpose_io.h:952
Definition: alt_generalpurpose_io.h:842
enum ALT_GPIO_PIN_POL_e ALT_GPIO_PIN_POL_t
Definition: alt_generalpurpose_io.h:255
Definition: alt_generalpurpose_io.h:980
ALT_GPIO_PIN_POL_t polarity
Definition: alt_generalpurpose_io.h:1022
Definition: alt_generalpurpose_io.h:816
Definition: alt_generalpurpose_io.h:974
Definition: alt_generalpurpose_io.h:866
ALT_STATUS_CODE alt_gpio_port_config(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, ALT_GPIO_PIN_DIR_t dir, ALT_GPIO_PIN_TYPE_t type, ALT_GPIO_PIN_POL_t pol, ALT_GPIO_PIN_DEBOUNCE_t debounc, uint32_t data)
Definition: alt_generalpurpose_io.c:351
ALT_STATUS_CODE alt_gpio_port_int_type_set(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t config)
Definition: alt_generalpurpose_io.c:184
Definition: alt_generalpurpose_io.h:230
Definition: alt_generalpurpose_io.h:834
enum ALT_GPIO_1BIT_e ALT_GPIO_1BIT_t
Definition: alt_generalpurpose_io.h:892
Definition: alt_generalpurpose_io.h:957
Definition: alt_generalpurpose_io.h:846
Definition: alt_generalpurpose_io.h:868
Definition: alt_generalpurpose_io.h:265
Definition: alt_generalpurpose_io.h:826
Definition: alt_generalpurpose_io.h:285
enum ALT_GPIO_PIN_DATA_e ALT_GPIO_PIN_DATA_t
uint32_t alt_gpio_port_int_pol_get(ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
Definition: alt_generalpurpose_io.c:248
Definition: alt_generalpurpose_io.h:269
Definition: alt_generalpurpose_io.h:828
Definition: alt_generalpurpose_io.h:824
Definition: alt_generalpurpose_io.h:906
Definition: alt_generalpurpose_io.h:181
Definition: alt_generalpurpose_io.h:944
Definition: alt_generalpurpose_io.h:938
Definition: alt_generalpurpose_io.h:253
Definition: alt_generalpurpose_io.h:130
Definition: alt_generalpurpose_io.h:291
Definition: alt_generalpurpose_io.h:946
ALT_STATUS_CODE alt_gpio_port_sync_set(ALT_GPIO_PORT_t gpio_pid, uint32_t config)
Definition: alt_generalpurpose_io.c:311
Definition: alt_generalpurpose_io.h:872
Definition: alt_generalpurpose_io.h:830
Definition: alt_generalpurpose_io.h:850
Definition: alt_generalpurpose_io.h:299
Definition: alt_generalpurpose_io.h:836
ALT_STATUS_CODE alt_gpio_port_sync_get(ALT_GPIO_PORT_t gpio_pid)
Definition: alt_generalpurpose_io.c:333
Definition: alt_generalpurpose_io.h:216
Definition: alt_generalpurpose_io.h:870
Definition: alt_generalpurpose_io.h:972
ALT_GPIO_PIN_DATA_t val
Definition: alt_generalpurpose_io.h:1043
Definition: alt_generalpurpose_io.h:225
Definition: alt_generalpurpose_io.h:920
ALT_GPIO_1BIT_t signal_number
Definition: alt_generalpurpose_io.h:1013
Definition: alt_generalpurpose_io.h:934
Definition: alt_generalpurpose_io.h:257
ALT_GPIO_1BIT_t signal_number
Definition: alt_generalpurpose_io.h:1040
Definition: alt_generalpurpose_io.h:267
enum ALT_GPIO_PIN_DIR_e ALT_GPIO_PIN_DIR_t
ALT_STATUS_CODE alt_gpio_port_data_write(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t val)
Definition: alt_generalpurpose_io.c:139
Definition: alt_generalpurpose_io.h:848
uint32_t alt_gpio_port_idcode_get(ALT_GPIO_PORT_t gpio_pid)
Definition: alt_generalpurpose_io.c:534
Definition: alt_generalpurpose_io.h:860
Definition: alt_generalpurpose_io.h:874
Definition: alt_generalpurpose_io.h:954
Definition: alt_generalpurpose_io.h:878
enum ALT_GPIO_PIN_TYPE_e ALT_GPIO_PIN_TYPE_t
Definition: alt_generalpurpose_io.h:249
Definition: alt_generalpurpose_io.h:882
ALT_STATUS_CODE alt_gpio_port_datadir_set(ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t config)
Definition: alt_generalpurpose_io.c:98
Definition: alt_generalpurpose_io.h:261
Definition: alt_generalpurpose_io.h:281
Definition: alt_generalpurpose_io.h:948
Definition: alt_generalpurpose_io.h:880
Definition: alt_generalpurpose_io.h:886
Definition: alt_generalpurpose_io.h:132
ALT_STATUS_CODE alt_gpio_bit_config(ALT_GPIO_1BIT_t signal_num, ALT_GPIO_PIN_DIR_t dir, ALT_GPIO_PIN_TYPE_t type, ALT_GPIO_PIN_POL_t pol, ALT_GPIO_PIN_DEBOUNCE_t debounce, ALT_GPIO_PIN_DATA_t data)
Definition: alt_generalpurpose_io.c:568
Definition: alt_generalpurpose_io.h:194
Definition: alt_generalpurpose_io.h:876
Definition: alt_generalpurpose_io.h:910
Definition: alt_generalpurpose_io.h:992
Definition: alt_generalpurpose_io.h:818
Definition: alt_generalpurpose_io.h:908
Definition: alt_generalpurpose_io.h:118
enum ALT_GPIO_PORT_e ALT_GPIO_PORT_t
uint32_t alt_gpio_port_int_enable_get(ALT_GPIO_PORT_t gpio_pid)
Definition: alt_generalpurpose_io.c:439
int32_t ALT_STATUS_CODE
Definition: hwlib.h:60
Definition: alt_generalpurpose_io.h:150
Definition: alt_generalpurpose_io.h:293
uint32_t alt_gpio_port_int_mask_get(ALT_GPIO_PORT_t gpio_pid)
Definition: alt_generalpurpose_io.c:478
Definition: alt_generalpurpose_io.h:914
Definition: alt_generalpurpose_io.h:900
Definition: alt_generalpurpose_io.h:183
Definition: alt_generalpurpose_io.h:986
Definition: alt_generalpurpose_io.h:820
Definition: alt_generalpurpose_io.h:283
Definition: alt_generalpurpose_io.h:838
Definition: alt_generalpurpose_io.h:116
enum ALT_GPIO_PIN_SYNC_e ALT_GPIO_PIN_SYNC_t
ALT_GPIO_PIN_DEBOUNCE_t debounce
Definition: alt_generalpurpose_io.h:1025
Definition: alt_generalpurpose_io.h:852
Definition: alt_generalpurpose_io.h:167
struct ALT_GPIO_PIN_RECORD_s ALT_GPIO_PIN_RECORD_t
Definition: alt_generalpurpose_io.h:196
Definition: alt_generalpurpose_io.h:966
Definition: alt_generalpurpose_io.h:988
uint32_t alt_gpio_port_ver_get(ALT_GPIO_PORT_t gpio_pid)
Definition: alt_generalpurpose_io.c:551
Definition: alt_generalpurpose_io.h:930
Definition: alt_generalpurpose_io.h:978
ALT_GPIO_PIN_DATA_e
Definition: alt_generalpurpose_io.h:191
Definition: alt_generalpurpose_io.h:1036
Definition: alt_generalpurpose_io.h:822
Definition: alt_generalpurpose_io.h:259
Definition: alt_generalpurpose_io.h:894
Definition: alt_generalpurpose_io.h:251
Definition: alt_generalpurpose_io.h:279
Definition: alt_generalpurpose_io.h:888
Definition: alt_generalpurpose_io.h:844
Definition: alt_generalpurpose_io.h:287
Definition: alt_generalpurpose_io.h:982
Definition: alt_generalpurpose_io.h:932
ALT_STATUS_CODE alt_gpio_group_config(ALT_GPIO_CONFIG_RECORD_t *config_array, uint32_t len)
Definition: alt_generalpurpose_io.c:622
Definition: alt_generalpurpose_io.h:295
ALT_GPIO_PORTBIT_e
Definition: alt_generalpurpose_io.h:246
Definition: alt_generalpurpose_io.h:912
enum ALT_GPIO_PIN_DEBOUNCE_e ALT_GPIO_PIN_DEBOUNCE_t
Definition: alt_generalpurpose_io.h:890
uint32_t alt_gpio_port_int_status_get(ALT_GPIO_PORT_t gpio_pid)
Definition: alt_generalpurpose_io.c:496
ALT_STATUS_CODE alt_gpio_bitconfig_get(ALT_GPIO_1BIT_t signal_num, ALT_GPIO_CONFIG_RECORD_t *config)
Definition: alt_generalpurpose_io.c:586
Definition: alt_generalpurpose_io.h:1009