quick question about const* hw

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Where can I find the names for the hw parameter in ASF4 calls such as in the call

hri_uart_set_IMR_TXRDY_bit(const void *const hw)

 

Specifically I need the hw name for UART3 but in general it would be nice to know where these defines are.  Thx.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You haven't said which micro, you haven't even said which family of micros (AVR8, AVR32, ARM etc)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The OP has three threads open on the usart... I suggest closing two of them as this is getting g confusing

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Right, sorry.  It's for the ATSAMS70Q21b (144 pin)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:

The OP has three threads open on the usart... I suggest closing two of them as this is getting g confusing

Jim

I found it's best to ask specific questions in different threads as each has a unique answer and so can be marked as answered.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nafai wrote:
I found it's best to ask specific questions in different threads as each has a unique answer and so can be marked as answered.

 

Not when its about the same thing...in this case the UART.  Should someone do a search they may miss you other threads that tie into the one that shows up in the search

 

JIm

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I need the hw name for UART3 but in general it would be nice to know where these defines are.

 Doesn't Atmel Studio's "Goto Implementation" find it for you?  (Right-click on the symbol...)

 

For CLI users, I recommend the ID Utils

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

westfw wrote:

I need the hw name for UART3 but in general it would be nice to know where these defines are.

 Doesn't Atmel Studio's "Goto Implementation" find it for you?  (Right-click on the symbol...)

 

For CLI users, I recommend the ID Utils

 

I can go to the implementation, but that just gives me the type definitions of each parameter.  I need to know how to find the actual defines/enums to use in a call.  For example in the call:

 

int32_t spi_m_sync_set_data_order(struct spi_m_sync_descriptor *spi, const enum spi_data_order dord);

 

The required spi_data_order parameter is (for example)  SPI_DATA_ORDER_MSB_1ST:

 

spi_m_sync_set_data_order(&SPI_0,SPI_DATA_ORDER_MSB_1ST);

 

 I somehow stumbled across that enum by just searching a lot.  But how do I find the allowed enums or other defines (such as SPI_0) easily without searching through a lot of .h / .c files?

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Once again this is where splitting the threads acts against you. I just had to go and look up your other thread where I posted the "Start" code:

 

	io_write(&EDBG_COM.io, example_hello_world, 12);

	while (1) {
		if (data_arrived == 0) {
			continue;
		}

		while (io_read(&EDBG_COM.io, &recv_char, 1) == 1) {
			while (io_write(&EDBG_COM.io, &recv_char, 1) != 1) {
			}
		}
		data_arrived = 0;
	}

 

So in this clearly "EDBG_COM" (whatever that is - never heard of it - we don't do much ARM stuff in this AVR section) is the UART device. So what westfw was suggesting I think was you hover the mouse cursor over EDBG_COM then right click and "goto implementation". There's a strong chance that wherever "EDBG_COM" is defined the other available UART devices will be defined close by so you can see the alternatives you can use in a similar call.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what westfw was suggesting I think was you hover the mouse cursor over EDBG_COM then right click and "goto implementation".

Yes.  The "goto implementation" isn't restricted to working only for functions.  It seems to pretty much work on any defined symbol, including ENUM and #DEFINE statements deep within the .h hierarchy.

I don't happen to have an example matching your processor/function usage, but on a similar program, when I "goto implementation" on a UART3 argument to some function, it does list a definition (off in C:\Users\billw\Documents\Atmel Studio\7.0\BLINK_SAMD21_EXAMP\BLINK_SAMD21_EXAMP\src\ASF\sam0\utils\cmsis\samd21\include\pio\samd21g15a.h or something...)

 

(It's really pretty amazingly useful!)