Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandervoord committed Apr 13, 2024
2 parents 5ce70a0 + df9af17 commit 661f8fb
Show file tree
Hide file tree
Showing 12 changed files with 443 additions and 74 deletions.
4 changes: 0 additions & 4 deletions Gemfile

This file was deleted.

12 changes: 0 additions & 12 deletions Gemfile.lock

This file was deleted.

11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,3 @@ configuration, you may want to run the included test suite. This is the test sui
projects we've used it on) that we use to make sure that things actually work the way we claim.
The test suite makes use of Ceedling, which uses the Unity Test Framework. It will require a native C compiler.
The example makefile and rakefile both use gcc.

License
=======

*This software is licensed under the MIT License:
Copyright (c) 2007-2021 Mark VanderVoord*

*Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.*

*_THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE._*
43 changes: 0 additions & 43 deletions docs/CException.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@

CException
==========

CException is a basic exception framework for C, suitable for use in
embedded applications. It provides an exception framework similar in
use to C++, but with much less overhead.


CException uses C standard library functions `setjmp` and `longjmp` to
operate. As long as the target system has these two functions defined,
this library should be useable with very little configuration. It
even supports environments where multiple program flows are in use,
such as real-time operating systems.


There are about a gabillion exception frameworks using a similar
setjmp/longjmp method out there... and there will probably be more
in the future. Unfortunately, when we started our last embedded
project, all those that existed either (a) did not support multiple
tasks (therefore multiple stacks) or (b) were way more complex than
we really wanted. CException was born.


*Why use CException?*


0. It's ANSI C, and it beats passing error codes around.
1. You want something simple... CException throws a single id. You can
define those ID's to be whatever you like. You might even choose which
Expand All @@ -37,10 +32,8 @@ we really wanted. CException was born.
your only additional overhead is the time it takes you to determine
a unique task id 0 - num_tasks.


For the latest version, go to [ThrowTheSwitch.org](http://throwtheswitch.org)


CONTENTS OF THIS DOCUMENT
=========================

Expand All @@ -60,20 +53,15 @@ The code directly following the Try call is "protected", meaning that
if any Throws occur, program control is directly transferred to the
start of the Catch block.


A numerical exception ID is included with Throw, and is made accessible
from the Catch block.


Throws can occur from within function calls (nested as deeply as you
like) or directly from within the function itself.



Limitations
-----------


This library was made to be as fast as possible, and provide basic
exception handling. It is not a full-blown exception library. Because
of this, there are a few limitations that should be observed in order
Expand Down Expand Up @@ -154,8 +142,6 @@ to successfully utilize this library:
replacing or wrapping malloc calls or something like that. This
is a light framework, so these options were not desirable.



API
---

Expand Down Expand Up @@ -255,7 +241,6 @@ you wanted and just use the defaults provided.
this the emergency fallback plan for when something has
gone terribly wrong.


You may also want to include any header files which will commonly be
needed by the rest of your application where it uses exception handling
here. For example, OS header files or exception codes would be useful.
Expand All @@ -279,11 +264,9 @@ where you will need these, but they are here if you need them:
* called immediately before the catch



TESTING
-------


If you want to validate that CException works with your tools or that
it works with your custom configuration, you may want to run the test
suite.
Expand All @@ -304,29 +287,3 @@ to compile and run the test application.
* The path to the Unity framework (required to run tests)
(get it at [ThrowTheSwitch.org](http://throwtheswitch.org))



LICENSE
-------

This software is licensed under the MIT License

Copyright (c) 2007-2021 Mark VanderVoord

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
138 changes: 138 additions & 0 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@

# ThrowTheSwitch.org Code of Conduct

Thank you for participating in a ThrowTheSwitch.org community project! We want
this to continue to be a warm and inviting place for everyone to share ideas
and get help. To accomplish this goal, we've developed this Code of Conduct.

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
hello@thingamabyte.com.

All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
Loading

0 comments on commit 661f8fb

Please sign in to comment.