SparkFun Forums 

Where electronics enthusiasts find answers.

Topics pertaining to the Arduino Core & software used with the Artemis module and Artemis development boards.
#248226
I think I have found the answer to my own question. It seems one can include the Ambiq code for Fast GPIO by:
Code: Select all

// Including the Ambiq gpio library
#include <am_hal_gpio.h>

#define _clockPin 37
....
// Initialize fast gpio where the HEX number is the pin map for the fast gpio pins i.e. pin 37 as an output
 am_hal_gpio_fast_pinconfig((uint64_t)0x1000000000, g_AM_HAL_GPIO_OUTPUT, 0);
 am_hal_gpio_fastgpio_enable(_clockPin);

...

//then use
//digitalWrite(_clockPin, HIGH);
 am_hal_gpio_fastgpio_set(_clockPin);

//digitalWrite(_clockPin, LOW);
 am_hal_gpio_fastgpio_clr(_clockPin);

 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum