Simple question about ASF coding standard in ASF

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

Dear Atmel,

 

It's probably only my opinion - but we are living in the world where FullHD and bigger monitors are a standard - so please tell me:

Why your coding standard limits line length to ~80 characters ?

Code looks completely unreadable - and one example:

 

from xdk-asf-3.23.1\thirdparty\wireless\avr2025_mac\source\mac\src\mac_mcps_data.c

#ifdef FFD
            {
                uint8_t loop_index;
                for (loop_index
                            = 0;
                        loop_index <
                        mac_pan_gts_table_len;
                        loop_index++) {
                    if (FCF_SHORT_ADDR ==
                            mdi->SrcAddrMode &&
                            (uint16_t)(mdi->SrcAddr)
                            == mac_pan_gts_table[
                                loop_index].
                            DevShortAddr
                            &&
                            GTS_TX_SLOT ==
                            mac_pan_gts_table[
                                loop_index].
                            GtsDesc.
                            GtsDirection) {
                        #ifdef GTS_DEBUG
                        port_pin_toggle_output_level(
                                DEBUG_PIN11);             /*
                                                                   * coord
                                                                   *
                                                                   *rx
                                                                   **/
                        #endif
                        reset_gts_expiry(
                                &mac_pan_gts_table[
                                    loop_index]);
                        break;
                    }
                }
            }
#endif /* FFD */
#endif /* GTS_SUPPORT */

 

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

prze_kie wrote:
Dear Atmel

If you want to address comment specifcally to Atmel, then you need to raise a support case. You do that via the myAtmel link at the top of all pages on the Atmel site.

 

Quote:
Why your coding standard limits line length to ~80 characters ?

You mean this: http://www.atmel.com/images/doc8...

 

I agree - that is an archaism!

 

Quote:
Code looks completely unreadable - and one example:

That code is illegible for so many reasons - not just the archaic 80-column limit!

 

surprise

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...