Indentation fixes

- Fix dir-locals so emacs won't inject occasional tabs to case statements.
- Fix stray tab indentation in example programs. (Thx @pfalcon for pointing this out)
This commit is contained in:
Angus Gratton 2015-06-09 09:00:32 +10:00
parent a59b1565e4
commit c09167715e
10 changed files with 234 additions and 226 deletions

View file

@ -1,5 +1,9 @@
((c-mode
(c-file-style . "BSD")
(
(nil
(indent-tabs-mode . nil)
)
(c-mode
(c-file-style . "bsd")
(c-basic-offset . 4)
)
)

View file

@ -96,6 +96,12 @@ For code submissions based on reverse engineered binary functionality, please ei
The best way to write suitable code is to first add documentation somewhere like the [esp8266 wiki](https://github.com/esp8266/esp8266-wiki/) describing factual information gained from reverse engineering - such as register addresses, bit masks, orders of register writes, etc. Then write new functions referring to that documentation as reference material.
## Coding Style
For new contributions, please use BSD style and indent using 4 spaces. If you're an emacs user then there is a .dir-locals.el file in the root which configures cc-mode.
Upstream code is left with the indentation and style of the upstream project.
## Sponsors
Work on esp-open-rtos is sponsored by [SuperHouse Automation](http://superhouse.tv/).
Work on esp-open-rtos has been sponsored by [SuperHouse Automation](http://superhouse.tv/).

View file

@ -15,22 +15,24 @@
be enough in all cases.
void gpio01_interrupt_handler(void) {
// Do something when GPIO 01 changes
}
void gpio12_interrupt_handler(void) {
// Do something when GPIO 12 changes
}
OR
- Implement a single function named gpio_interrupt_handler(). This
will need to manually check GPIO_STATUS_REG and clear any status
bits after handling interrupts. This gives you full control, but
you can't combine it with the first approach.
void gpio_interrupt_handler(void) {
}
* Part of esp-open-rtos
* Copyright (C) 2015 Superhouse Automation Pty Ltd
* BSD Licensed as described in the file LICENSE
Part of esp-open-rtos
Copyright (C) 2015 Superhouse Automation Pty Ltd
BSD Licensed as described in the file LICENSE
*/
#include "esp8266.h"

View file

@ -44,4 +44,3 @@ INLINED uint8_t iomux_to_gpio(const uint8_t iomux_number)
}
#endif

View file

@ -222,4 +222,3 @@ static void display_cipher(SSL *ssl)
printf("\n");
}

View file

@ -42,5 +42,3 @@ void user_init(void)
xTaskCreate(task1, (signed char *)"tsk1", 256, &mainqueue, 2, NULL);
xTaskCreate(task2, (signed char *)"tsk2", 256, &mainqueue, 2, NULL);
}