mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-23 16:29:34 +00:00
pulled in gpio_data_get from the quahogcon guys.
This commit is contained in:
parent
444d79e55f
commit
7b3a8b9f77
@ -13,6 +13,15 @@ inline void gpio_data(volatile uint64_t data)
|
||||
*GPIO_DATA1 = (data >> 32);
|
||||
}
|
||||
|
||||
inline uint64_t gpio_data_get(volatile uint64_t bits) {
|
||||
uint64_t rdata = 0;
|
||||
|
||||
rdata = *GPIO_DATA0 & (bits & 0xffffffff);
|
||||
rdata |= (*GPIO_DATA1 & (bits >> 32)) << 32;
|
||||
|
||||
return rdata;
|
||||
}
|
||||
|
||||
inline void gpio_pad_pu_en(volatile uint64_t data)
|
||||
{
|
||||
*GPIO_PAD_PU_EN0 = (data & 0xffffffff);
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
inline void gpio_pad_dir(volatile uint64_t data);
|
||||
inline void gpio_data(volatile uint64_t data);
|
||||
inline uint64_t gpio_data_get(volatile uint64_t bits);
|
||||
inline void gpio_pad_pu_en(volatile uint64_t data);
|
||||
inline void gpio_data_sel(volatile uint64_t data);
|
||||
inline void gpio_data_pu_sel(volatile uint64_t data);
|
||||
|
Loading…
Reference in New Issue
Block a user