Jump to content
lilyhack

TivaWare library with Energia on Mac

Recommended Posts

If you are looking at using TivaWare driverlib API call then no need to install TivaWare since driverlib is already installed. You can simply include the headers for the functions you want to use and call the API's. Note that the current release has an outdated driverlib installation which will be updated in the near future. Regardless, you can use this driverlib to get started without issues.

 

e.g.:

#include <stdint.h>
#include <stdbool.h>
#include "driverlib/gpio.h"
#include "inc/hw_gpio.h"

void setup()
{
  // put your setup code here, to run once:
  GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1);
}

void loop()
{
  // put your main code here, to run repeatedly:
  GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, GPIO_PIN_1);
  delay(100);
  GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, 0);
  delay(100);
}

Robert

Share this post


Link to post
Share on other sites

If you are looking at using TivaWare driverlib API call then no need to install TivaWare since driverlib is already installed. You can simply include the headers for the functions you want to use and call the API's. Note that the current release has an outdated driverlib installation which will be updated in the near future. Regardless, you can use this driverlib to get started without issues.

 

e.g.:

#include <stdint.h>
#include <stdbool.h>
#include "driverlib/gpio.h"
#include "inc/hw_gpio.h"

void setup()
{
  // put your setup code here, to run once:
  GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, GPIO_PIN_1);
}

void loop()
{
  // put your main code here, to run repeatedly:
  GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, GPIO_PIN_1);
  delay(100);
  GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, 0);
  delay(100);
}

Robert

 

@@Robert

I am planning to use ADC functionalities. Is that part of driverlib?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×