Showing preview only (1,587K chars total). Download the full file or copy to clipboard to get everything.
Repository: insane-adding-machines/frosted
Branch: master
Commit: 5c3aa21f146a
Files: 224
Total size: 1.5 MB
Directory structure:
gitextract_hhcit_l3/
├── .gitignore
├── .gitmodules
├── .project
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── Makefile
├── README.md
├── defconfig/
│ ├── lpc1769.config
│ ├── lpc17xx.config
│ ├── qemu-orig.config
│ ├── qemu.config
│ ├── qemunet.config
│ ├── stm32f407-discovery.config
│ ├── stm32f429i-discovery.config
│ ├── stm32f746-discovery.config
│ ├── stm32f746-nucleo.config
│ └── stm32f769-discovery.config
├── gdbinit.bflt
├── gdbinit.mini
├── include/
│ └── frosted_api.h
├── kconfig/
│ ├── .gitignore
│ ├── Kconfig
│ ├── Makefile
│ ├── Makefile.frosted
│ ├── POTFILES.in
│ ├── STM32F4x1Discovery.cfg
│ ├── check.sh
│ ├── conf.c
│ ├── confdata.c
│ ├── expr.c
│ ├── expr.h
│ ├── frosted.conf
│ ├── gconf.c
│ ├── gconf.glade
│ ├── images.c
│ ├── kxgettext.c
│ ├── list.h
│ ├── lkc.h
│ ├── lkc_proto.h
│ ├── lpc17xx.cfg
│ ├── mconf.c
│ ├── menu.c
│ ├── merge_config.sh
│ ├── nconf.c
│ ├── nconf.gui.c
│ ├── nconf.h
│ ├── qconf.cc
│ ├── qconf.h
│ ├── qemu2.cfg
│ ├── streamline_config.pl
│ ├── symbol.c
│ ├── util.c
│ ├── zconf.gperf
│ ├── zconf.hash.c_shipped
│ ├── zconf.l
│ ├── zconf.lex.c_shipped
│ ├── zconf.tab.c_shipped
│ └── zconf.y
├── kernel/
│ ├── Kconfig
│ ├── adc.h
│ ├── bflt.c
│ ├── bflt.h
│ ├── cdc_acm.h
│ ├── cdc_ecm.h
│ ├── cirbuf.c
│ ├── cirbuf.h
│ ├── crypto/
│ │ ├── aes.c
│ │ ├── aes.h
│ │ ├── misc.c
│ │ ├── misc.h
│ │ ├── sha256.c
│ │ └── sha256.h
│ ├── device.h
│ ├── drivers/
│ │ ├── device.c
│ │ ├── devusb_cdc_ecm.c
│ │ ├── dma.h
│ │ ├── dsp.h
│ │ ├── eth.h
│ │ ├── exti.c
│ │ ├── exti.h
│ │ ├── fbcon.c
│ │ ├── fbcon.h
│ │ ├── fonts.h
│ │ ├── fortuna.c
│ │ ├── framebuffer.h
│ │ ├── frand.c
│ │ ├── ft5336.c
│ │ ├── gpio.c
│ │ ├── gpio.h
│ │ ├── i2c.h
│ │ ├── ili9341.c
│ │ ├── l3gd20.c
│ │ ├── l3gd20.h
│ │ ├── lis3dsh.c
│ │ ├── lis3dsh.h
│ │ ├── lm3s_eth.c
│ │ ├── lsm303dlhc.c
│ │ ├── lsm303dlhc.h
│ │ ├── ltdc.h
│ │ ├── mccog21.c
│ │ ├── null.c
│ │ ├── pty.c
│ │ ├── pty.h
│ │ ├── rng.h
│ │ ├── sdio.h
│ │ ├── sdram.h
│ │ ├── socket_in.c
│ │ ├── socket_in.h
│ │ ├── socket_un.c
│ │ ├── spi.h
│ │ ├── stm32_dma.c
│ │ ├── stm32_eth.c
│ │ ├── stm32_i2c.c
│ │ ├── stm32_lowpower.c
│ │ ├── stm32_rng.c
│ │ ├── stm32_sdio.c
│ │ ├── stm32_sdio.h
│ │ ├── stm32_spi.c
│ │ ├── stm32_usb.c
│ │ ├── stm32f4_adc.c
│ │ ├── stm32f4_dsp.c
│ │ ├── stm32f4_sdram.c
│ │ ├── stm32f7_ltdc.c
│ │ ├── stm32f7_sdram.c
│ │ ├── stmpe811.c
│ │ ├── stmpe811.h
│ │ ├── tty_console.c
│ │ ├── tty_console.h
│ │ ├── uart.c
│ │ ├── uart.h
│ │ ├── uart_dev.h
│ │ ├── usb/
│ │ │ ├── usb_kbd.c
│ │ │ └── usbh_drivers.h
│ │ ├── usb.h
│ │ └── xadow_LED_5x7.c
│ ├── fonts/
│ │ ├── cga_8x8.c
│ │ ├── palette_256_xterm.c
│ │ └── piccolo_7x6.c
│ ├── fortuna.h
│ ├── fpb.c
│ ├── fpb.h
│ ├── framebuffer.c
│ ├── frand.h
│ ├── frosted.c
│ ├── frosted.h
│ ├── fs/
│ │ ├── fatfs.c
│ │ ├── fatfs.h
│ │ ├── memfs.c
│ │ ├── sysfs.c
│ │ ├── xipfs.c
│ │ └── xipfs.h
│ ├── getaddrinfo.c
│ ├── hardfault_debug.c
│ ├── heap.h
│ ├── interrupts.h
│ ├── kprintf.c
│ ├── kprintf.h
│ ├── lm3s/
│ │ ├── Kconfig
│ │ ├── lm3s.c
│ │ ├── lm3s.ld.in
│ │ └── lm3s6965evb.c
│ ├── locks.c
│ ├── locks.h
│ ├── lowpower.h
│ ├── lpc17xx/
│ │ ├── Kconfig
│ │ ├── lpc1768mbed.c
│ │ ├── lpc1769xpresso.c
│ │ └── lpc17xx.ld.in
│ ├── lpc17xx.h
│ ├── malloc.c
│ ├── malloc.h
│ ├── module.c
│ ├── mpu.c
│ ├── mpu.h
│ ├── mutex.S
│ ├── net/
│ │ ├── Kconfig
│ │ ├── if.h
│ │ ├── pico_lock.c
│ │ └── route.h
│ ├── nrf51/
│ │ ├── Kconfig
│ │ ├── blenanov1_5.c
│ │ └── nrf51.ld.in
│ ├── nrf52/
│ │ ├── Kconfig
│ │ ├── blenanov2_0.c
│ │ └── nrf52.ld.in
│ ├── null.h
│ ├── pico_port.h
│ ├── pipe.c
│ ├── scheduler.c
│ ├── scheduler.h
│ ├── semaphore.S
│ ├── stm32f4/
│ │ ├── Kconfig
│ │ ├── stm32f4.ld.in
│ │ ├── stm32f407discovery.c
│ │ ├── stm32f407diymore.c
│ │ ├── stm32f411nucleo.c
│ │ ├── stm32f429discovery.c
│ │ ├── stm32f446nucleo.c
│ │ ├── stm32f4x1discovery.c
│ │ └── stm32f4xxpyboard.c
│ ├── stm32f7/
│ │ ├── Kconfig
│ │ ├── stm32f7.ld.in
│ │ ├── stm32f746discovery.c
│ │ ├── stm32f746nucleo-144.c
│ │ └── stm32f769discovery.c
│ ├── string.c
│ ├── string.h
│ ├── sys.c
│ ├── syscall_table_gen.py
│ ├── syscall_vector.c
│ ├── systick.c
│ ├── tasklet.c
│ ├── term.c
│ ├── vfs.c
│ └── vfs.h
├── qemu.gdbinit
├── rules/
│ ├── arch.mk
│ ├── config.mk
│ ├── picotcp.mk
│ └── userspace.mk
├── scripts/
│ ├── frosted-dev-setup
│ └── frosted-qemu-setup
└── xipfs.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# Object files
*.o
*.ko
*.obj
*.elf
*.bin
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
*.map
# Debug files
*.dSYM/
*.lst
*.d
tags
#python compiled
*.pyc
#kconfig
kconfig/.config
kconfig/.config.old
kconfig/.depend
#generated files
apps/apps.ld
.gdbinit
build/
kernel/syscall_table.c
*.img
*.ld
================================================
FILE: .gitmodules
================================================
[submodule "apps/busybox"]
path = apps/busybox
url = https://github.com/insane-adding-machines/busybox.git
[submodule "kernel/net/picotcp"]
path = kernel/net/picotcp
url = https://github.com/danielinux/picotcp.git
[submodule "frosted-userland"]
path = frosted-userland
url = https://github.com/insane-adding-machines/frosted-userland.git
[submodule "kernel/frosted-headers"]
path = kernel/frosted-headers
url = https://github.com/insane-adding-machines/frosted-headers.git
[submodule "kernel/unicore-mx"]
path = kernel/unicore-mx
url = https://github.com/insane-adding-machines/unicore-mx.git
================================================
FILE: .project
================================================
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Frosted</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
<triggers>clean,full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.cdt.core.cnature</nature>
<nature>org.eclipse.cdt.core.ccnature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
</natures>
</projectDescription>
================================================
FILE: CODE_OF_CONDUCT.md
================================================
Code of Conduct
Insane-adding-machines is a community organization, whose purpose is to promote the use of Free Software in the Internet of things.
We value the involvement of everyone in this community. We are committed to creating a friendly and respectful place for learning, teaching and contributing. All participants in our events and communications are expected to show respect and courtesy to others.
To make clear what is expected, everyone participating in activities within Insane-adding-machines is required to conform to the following Code of Conduct. This code of conduct applies to all spaces managed by Insane-adding-machines including, but not limited to, workshops, email lists, online forums, IRC channels and on GitHub.
Code of Conduct
===============
Insane-adding-machines are dedicated to providing a welcoming and supportive environment for all people, regardless of background or identity. However, we recognise that some groups in our community are subject to historical and ongoing discrimination, and may be vulnerable or disadvantaged. Membership in such a specific group can be on the basis of characteristics such as gender, sexual orientation, disability, physical appearance, body size, race, nationality, sex, colour, ethnic or social origin, pregnancy, citizenship, familial status, veteran status, genetic information, religion or belief, political or any other opinion, membership of a national minority, property, birth, age, or choice of text editor. We do not tolerate harassment of participants on the basis of these categories, or for any other reason.
Harassment is any form of behaviour intended to exclude, intimidate, or cause discomfort. Because we are a diverse community, we may have different ways of communicating and of understanding the intent behind actions. Therefore we have chosen to prohibit certain forms of behaviour in our community, regardless of intent. Prohibited harassing behaviour includes but is not limited to:
- written or verbal comments which have the effect of excluding people on the basis of membership of a specific group listed above
causing someone to fear for their safety, such as through stalking, following, or intimidation
- the display of sexual or violent images
- unwelcome sexual attention
- nonconsensual or unwelcome physical contact
- sustained disruption of talks, events or communications
- incitement to violence, suicide, or self-harm
- continuing to initiate interaction (including photography or recording) with someone after being asked to stop
- publication of private communication without consent
Behaviour not explicitly mentioned above may still constitute harassment. The list above should not be taken as exhaustive but rather as a guide to make it easier to enrich all of us and the communities in which we participate. All interactions should be professional regardless of location: harassment is prohibited whether it occurs on- or offline, and the same standards apply to both.
Enforcement of the Code of Conduct will be respectful and not include any harassing behaviors.
Thank you for helping make this a welcoming, friendly community for all.
This code of conduct is a modified version of that used by PyCon, which in turn is forked from a template written by the Ada Initiative and hosted on the Geek Feminism Wiki. Contributors to this document: Adam Obeng, Aleksandra Pawlik, Bill Mills, Carol Willing, Erin Becker, Hilmar Lapp, Kara Woo, Karin Lagesen, Pauline Barmby, Sheila Miguez, Simon Waldman, Tracy Teal.
================================================
FILE: CONTRIBUTING.md
================================================
Contributing to Frosted
-----------------
Frosted is a community project with no strong copyright enforcement.
You are free to contribute to the official repository, hosted at
github.com/insane-adding-machines/frosted.
By contributing to Frosted, you agree that the code you write will be
published and distributed under the term of GNU General Public License,
as specified in LICENSE.
We don't ask to yield any rights to the code you write, except those
required by the LICENSE.
In order to contribute, fork the project on github, commit in your local repository, submit a PR.
Regular contributors that show interest for the projects are added to the community.
Being part of the community means accepting the Code of Conduct.
Coding style
-----------------
- Indentation is 4 spaces (no tabs)
- no spaces inside parenthesis
- spaces around binary operators
- no trailing spaces
- we place a space after every keyword
- constants and macros are capitalized
- the asterisk in a pointer declaration is adjacent to the symbol name, not its type
- function opening brace is on the next line
- inner blocks opening brace is on the same line
- function/variable case default is `snake_case` and not `CamelCase`
- no typedefs (exceptions must be discussed and approved by the community)
- write short functions with meaningful names
- centralized return point for functions is encouraged. The use of keyword `goto` is allowed to create a centralized return point.
More in general, we appreciate if you follow the same style as the existing kernel code.
================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
================================================
FILE: Makefile
================================================
-include kconfig/.config
FROSTED:=$(PWD)
FLASH_ORIGIN?=0x0
CFLAGS+=-DFLASH_ORIGIN=$(FLASH_ORIGIN)
ifneq ($(V),1)
Q:=@
#Do not print "Entering directory ...".
MAKEFLAGS += --no-print-directory
endif
#kernel headers
CFLAGS+=-Ikernel/frosted-headers/include -nostdlib
#drivers headers
CFLAGS+=-Ikernel/drivers
#fs headers
CFLAGS+=-Ikernel/fs
# minimal kernel
OBJS-y+= kernel/frosted.o \
kernel/vfs.o \
kernel/systick.o \
kernel/drivers/device.o \
kernel/mpu.o \
kernel/fpb.o \
kernel/string.o \
kernel/sys.o \
kernel/locks.o \
kernel/semaphore.o \
kernel/mutex.o \
kernel/tasklet.o \
kernel/scheduler.o \
kernel/syscall_table.o \
kernel/malloc.o \
kernel/module.o \
kernel/cirbuf.o \
kernel/term.o \
kernel/bflt.o \
kernel/getaddrinfo.o \
kernel/kprintf.o \
kernel/pipe.o
-include rules/config.mk
include rules/arch.mk
include rules/picotcp.mk
include rules/userspace.mk
# device drivers
OBJS-$(ARCH_STM32F4)+=kernel/drivers/gpio.o \
kernel/drivers/exti.o
OBJS-$(ARCH_STM32F7)+=kernel/drivers/gpio.o \
kernel/drivers/exti.o
OBJS-$(ARCH_LPC17XX)+=kernel/drivers/gpio.o
OBJS-$(ARCH_NRF51)+=kernel/drivers/gpio.o
OBJS-$(ARCH_NRF52)+=kernel/drivers/gpio.o
OBJS-$(MEMFS)+= kernel/fs/memfs.o
OBJS-$(XIPFS)+= kernel/fs/xipfs.o
CFLAGS-$(MEMFS)+=-DCONFIG_MEMFS
OBJS-$(FATFS)+= kernel/fs/fatfs.o
CFLAGS-$(FATFS)+=-DCONFIG_FATFS
CFLAGS-$(FAT32)+=-DCONFIG_FAT32
OBJS-$(SYSFS)+= kernel/fs/sysfs.o
CFLAGS-$(SYSFS)+=-DCONFIG_SYSFS
OBJS-$(DEVNULL)+= kernel/drivers/null.o
CFLAGS-$(DEVNULL)+=-DCONFIG_DEVNULL
OBJS-$(SOCK_UNIX)+= kernel/drivers/socket_un.o
CFLAGS-$(SOCK_UNIX)+=-DCONFIG_SOCK_UNIX
OBJS-$(PTY_UNIX)+= kernel/drivers/pty.o
CFLAGS-$(PTY_UNIX)+=-DCONFIG_PTY_UNIX
OBJS-$(PICOTCP)+= kernel/drivers/socket_in.o
CFLAGS-$(PICOTCP)+=-DCONFIG_PICOTCP
CFLAGS-$(CONFIG_PICOTCP_LOOP)+="-DCONFIG_PICOTCP_LOOP"
CFLAGS-$(TCPIP_MEMPOOL_YN)+=-DCONFIG_TCPIP_MEMPOOL=$(TCPIP_MEMPOOL)
OBJS-$(DEVL3GD20)+= kernel/drivers/l3gd20.o
CFLAGS-$(DEVL3GD20)+=-DCONFIG_DEVL3GD20
OBJS-$(DEVLSM303DLHC)+= kernel/drivers/lsm303dlhc.o
CFLAGS-$(DEVLSM303DLHC)+=-DCONFIG_DEVLSM303DLHC
OBJS-$(DEVSTMPE811)+= kernel/drivers/stmpe811.o
CFLAGS-$(DEVSTMPE811)+=-DCONFIG_DEVSTMPE811
OBJS-$(DEVFT5336)+= kernel/drivers/ft5336.o
CFLAGS-$(DEVFT5336)+=-DCONFIG_DEVFT5336
OBJS-$(DEVMCCOG21)+= kernel/drivers/mccog21.o
CFLAGS-$(DEVMCCOG21)+=-DCONFIG_DEVMCCOG21
OBJS-$(DEVXALED5X7)+= kernel/drivers/xadow_LED_5x7.o
CFLAGS-$(DEVXALED5X7)+=-DCONFIG_DEVXALED5X7
OBJS-$(DEVSPI)+= kernel/drivers/stm32_spi.o
CFLAGS-$(DEVSPI)+=-DCONFIG_DEVSTM32F4SPI
OBJS-$(DEVLIS3DSH)+= kernel/drivers/lis3dsh.o
CFLAGS-$(DEVLIS3DSH)+=-DCONFIG_DEVLIS3DSH
OBJS-$(DEVSTM32I2C)+= kernel/drivers/stm32_i2c.o
CFLAGS-$(DEVSTM32I2C)+=-DCONFIG_DEVI2C
OBJS-$(DEVF4DSP)+=kernel/drivers/stm32f4_dsp.o
CFLAGS-$(DEVF4DSP)+=-DCONFIG_DSP
OBJS-$(DEVF4ETH)+= kernel/drivers/stm32_eth.o
CFLAGS-$(DEVF4ETH)+=-DCONFIG_DEVETH
OBJS-$(DEVF7ETH)+= kernel/drivers/stm32_eth.o
CFLAGS-$(DEVF7ETH)+=-DCONFIG_DEVETH
OBJS-$(DEVLM3SETH)+= kernel/drivers/lm3s_eth.o
CFLAGS-$(DEVLM3SETH)+=-DCONFIG_DEVETH
OBJS-$(DEVUART)+= kernel/drivers/uart.o
CFLAGS-$(DEVUART)+=-DCONFIG_DEVUART
OBJS-$(DEVILI9341)+= kernel/drivers/ili9341.o
CFLAGS-$(DEVILI9341)+=-DCONFIG_DEVILI9341 -DCONFIG_LTDC
OBJS-$(DEVF7DISCOLTDC) += kernel/drivers/stm32f7_ltdc.o
CFLAGS-$(DEVF7DISCOLTDC)+=-DCONFIG_DEVF7DISCOLTDC -DCONFIG_LTDC
OBJS-$(DEVFRAMEBUFFER)+= kernel/framebuffer.o
CFLAGS-$(DEVFRAMEBUFFER)+=-DCONFIG_DEVFRAMEBUFFER
OBJS-$(DEVFBCON)+= kernel/drivers/fbcon.o kernel/fonts/palette_256_xterm.o kernel/drivers/tty_console.o
CFLAGS-$(DEVFBCON)+=-DCONFIG_DEVTTY_CONSOLE
# Font Selection
OBJS-$(FONT_CGA_8X8)+=kernel/fonts/cga_8x8.o
CFLAGS-$(FONT_CGA_8X8)+=-DCONFIG_FONT_8x8
OBJS-$(FONT_PICCOLO_7X6)+=kernel/fonts/piccolo_7x6.o
CFLAGS-$(FONT_PICCOLO_7X6)+=-DCONFIG_FONT_7x6
CFLAGS-$(DEVFBCON)+=-DCONFIG_DEVFBCON
OBJS-$(DEVSTM32DMA)+=kernel/drivers/stm32_dma.o
CFLAGS-$(DEVSTM32DMA)+=-DCONFIG_DMA
CFLAGS-$(DEVSTM32USB)+=-DCONFIG_DEVUSB
OBJS-$(DEVSTM32USB)+=kernel/drivers/stm32_usb.o
CFLAGS-$(DEVSTM32USBFS)+=-DCONFIG_DEVUSBFS
CFLAGS-$(DEVSTM32USBHS)+=-DCONFIG_DEVUSBHS
CFLAGS-$(USBFS_HOST)+=-DCONFIG_USBHOST -DCONFIG_USBFSHOST
CFLAGS-$(USBHS_HOST)+=-DCONFIG_USBHOST -DCONFIG_USBHSHOST
OBJS-$(DEVSTM32SDIO)+=kernel/drivers/stm32_sdio.o
CFLAGS-$(DEVSTM32SDIO)+=-DCONFIG_SDIO
OBJS-$(LOWPOWER)+=kernel/drivers/stm32_lowpower.o
CFLAGS-$(LSE32K)+=-DCONFIG_LSE32K
OBJS-$(DEVADC)+=kernel/drivers/stm32f4_adc.o
CFLAGS-$(DEVADC)+=-DCONFIG_DEVADC
OBJS-$(DEVRNG)+=kernel/drivers/stm32_rng.o
CFLAGS-$(DEVRNG)+=-DCONFIG_RNG
OBJS-$(DEVFRAND)+=kernel/drivers/stm32_rng.o \
kernel/crypto/misc.o \
kernel/crypto/sha256.o \
kernel/crypto/aes.o \
kernel/drivers/fortuna.o \
kernel/drivers/frand.o
CFLAGS-$(DEVFRAND)+=-DCONFIG_FRAND -DCONFIG_RNG
OBJS-$(STM32F7_SDRAM)+=kernel/drivers/stm32f7_sdram.o
OBJS-$(STM32F4_SDRAM)+=kernel/drivers/stm32f4_sdram.o
CFLAGS-$(STM32F7_SDRAM)+=-DCONFIG_SDRAM
CFLAGS-$(STM32F4_SDRAM)+=-DCONFIG_SDRAM
OBJS-$(DEV_USB_ETH)+=kernel/drivers/devusb_cdc_ecm.o
CFLAGS-$(DEV_USB_ETH)+=-DCONFIG_DEV_USBETH
CFLAGS-$(DEV_USB_ETH)+=-DCONFIG_USB_DEFAULT_IP=\"$(USB_DEFAULT_IP)\"
CFLAGS-$(DEV_USB_ETH)+=-DCONFIG_USB_DEFAULT_NM=\"$(USB_DEFAULT_NM)\"
CFLAGS-$(DEV_USB_ETH)+=-DCONFIG_USB_DEFAULT_GW=\"$(USB_DEFAULT_GW)\"
OBJS-$(DEV_USBH_KBD)+=kernel/drivers/usb/usb_kbd.o
CFLAGS-$(DEV_USBH_KBD)+=-DCONFIG_DEV_USBH_KBD
CFLAGS-$(DEVF4ETH)+=-DCONFIG_DEV_ETH
CFLAGS-$(DEVF4ETH)+=-DCONFIG_ETH_DEFAULT_IP=\"$(ETH_DEFAULT_IP)\"
CFLAGS-$(DEVF4ETH)+=-DCONFIG_ETH_DEFAULT_NM=\"$(ETH_DEFAULT_NM)\"
CFLAGS-$(DEVF4ETH)+=-DCONFIG_ETH_DEFAULT_GW=\"$(ETH_DEFAULT_GW)\"
CFLAGS-$(DEVF7ETH)+=-DCONFIG_DEV_ETH
CFLAGS-$(DEVF7ETH)+=-DCONFIG_ETH_DEFAULT_IP=\"$(ETH_DEFAULT_IP)\"
CFLAGS-$(DEVF7ETH)+=-DCONFIG_ETH_DEFAULT_NM=\"$(ETH_DEFAULT_NM)\"
CFLAGS-$(DEVF7ETH)+=-DCONFIG_ETH_DEFAULT_GW=\"$(ETH_DEFAULT_GW)\"
CFLAGS-$(DEVLM3SETH)+=-DCONFIG_DEV_ETH
CFLAGS-$(DEVLM3SETH)+=-DCONFIG_ETH_DEFAULT_IP=\"$(ETH_DEFAULT_IP)\"
CFLAGS-$(DEVLM3SETH)+=-DCONFIG_ETH_DEFAULT_NM=\"$(ETH_DEFAULT_NM)\"
CFLAGS-$(DEVLM3SETH)+=-DCONFIG_ETH_DEFAULT_GW=\"$(ETH_DEFAULT_GW)\"
OBJS-$(MACH_STM32F407Discovery)+=kernel/$(BOARD)/stm32f407discovery.o
CFLAGS-$(MACH_STM32F405Pyboard10)+=-DCONFIG_PYBOARD_1_0
CFLAGS-$(MACH_STM32F405Pyboard11)+=-DCONFIG_PYBOARD_1_1 -DCLOCK_12MHZ
CFLAGS-$(MACH_STM32F411Pyboard11lite)+=-DCONFIG_PYBOARD_1_1 -DCLOCK_12MHZ
OBJS-$(MACH_STM32F405Pyboard10)+=kernel/$(BOARD)/stm32f4xxpyboard.o
OBJS-$(MACH_STM32F405Pyboard11)+=kernel/$(BOARD)/stm32f4xxpyboard.o
OBJS-$(MACH_STM32F411Pyboard11lite)+=kernel/$(BOARD)/stm32f4xxpyboard.o
OBJS-$(MACH_STM32F411Nucleo)+=kernel/$(BOARD)/stm32f411nucleo.o
OBJS-$(MACH_STM32F4x1Discovery)+=kernel/$(BOARD)/stm32f4x1discovery.o
OBJS-$(MACH_STM32F429Discovery)+=kernel/$(BOARD)/stm32f429discovery.o
OBJS-$(MACH_STM32F446Nucleo)+=kernel/$(BOARD)/stm32f446nucleo.o
OBJS-$(MACH_STM32F746Discovery)+=kernel/$(BOARD)/stm32f746discovery.o
OBJS-$(MACH_STM32F769Discovery)+=kernel/$(BOARD)/stm32f769discovery.o
OBJS-$(MACH_STM32F746Nucleo144)+=kernel/$(BOARD)/stm32f746nucleo-144.o
OBJS-$(MACH_LPC1768MBED)+=kernel/$(BOARD)/lpc1768mbed.o
OBJS-$(MACH_SEEEDPRO)+=kernel/$(BOARD)/lpc1768mbed.o
OBJS-$(MACH_LPC1679XPRESSO)+=kernel/$(BOARD)/lpc1769xpresso.o
OBJS-$(MACH_LM3S6965EVB)+=kernel/$(BOARD)/lm3s6965evb.o
OBJS-$(MACH_LM3SVIRT)+=kernel/$(BOARD)/lm3s6965evb.o
OBJS-$(MACH_BLENANOV1_5)+=kernel/$(BOARD)/blenanov1_5.o
OBJS-$(MACH_BLENANOV2_0)+=kernel/$(BOARD)/blenanov2_0.o
OBJS-$(MACH_STM32F407Diymore)+=kernel/$(BOARD)/stm32f407diymore.o
LIB-y:=
LIB-$(PICOTCP)+=$(PREFIX)/lib/libpicotcp.a
LIB-y+=kernel/unicore-mx/lib/libucmx_$(BOARD).a
OBJS-$(PICOTCP)+=kernel/net/pico_lock.o
CFLAGS+=$(CFLAGS-y)
SHELL=/bin/bash
all: image.bin
kernel/syscall_table.c: kernel/syscall_table_gen.py
@python2 $^
$(PREFIX)/lib/libpicotcp.a:
echo $(BUILD_PICO)
$(BUILD_PICO)
@pwd
.PHONY: FORCE st-flash
st-flash: image.bin
st-flash write image.bin 0x08000000
kernel.img: kernel.elf
@export PADTO=`python2 -c "print ( $(KFLASHMEM_SIZE) * 1024) + int('$(FLASH_ORIGIN)', 16)"`; \
$(CROSS_COMPILE)objcopy -O binary --pad-to=$$PADTO kernel.elf $@
apps.img: $(USERSPACE)
@make -C $(USERSPACE) FROSTED=$(PWD) FAMILY=$(FAMILY) ARCH=$(MCPU)
image.bin: kernel.img apps.img
cat kernel.img apps.img > $@
kernel/unicore-mx/lib/libucmx_$(BOARD).a:
make -C kernel/unicore-mx FP_FLAGS="-mfloat-abi=soft" PREFIX=arm-frosted-eabi TARGETS=$(UNICOREMX_TARGET)
kernel/$(BOARD)/$(BOARD).ld: kernel/$(BOARD)/$(BOARD).ld.in
export KRAMMEM_SIZE_B=`python2 -c "print '0x%X' % ( $(KRAMMEM_SIZE) * 1024)"`; \
export KFLASHMEM_SIZE_B=`python2 -c "print '0x%X' % ( $(KFLASHMEM_SIZE) * 1024)"`; \
export RAM1_SIZE_B=`python2 -c "print '0x%X' % ( $(RAM1_SIZE) * 1024)"`; \
export RAM2_SIZE_B=`python2 -c "print '0x%X' % ( $(RAM2_SIZE) * 1024)"`; \
export RAM3_SIZE_B=`python2 -c "print '0x%X' % ( $(RAM3_SIZE) * 1024)"`; \
export SDRAM_SIZE_B=`python2 -c "print '0x%X' % ( $(SDRAM_SIZE))"`; \
cat $^ | sed -e "s/__FLASH_ORIGIN/$(FLASH_ORIGIN)/g" | \
sed -e "s/__KFLASHMEM_SIZE/$$KFLASHMEM_SIZE_B/g" | \
sed -e "s/__KRAMMEM_SIZE/$$KRAMMEM_SIZE_B/g" |\
sed -e "s/__RAM1_BASE/$(RAM1_BASE)/g" |\
sed -e "s/__RAM2_BASE/$(RAM2_BASE)/g" |\
sed -e "s/__RAM3_BASE/$(RAM3_BASE)/g" |\
sed -e "s/__SDRAM_BASE/$(SDRAM_BASE)/g" |\
sed -e "s/__RAM1_SIZE/$$RAM1_SIZE_B/g" |\
sed -e "s/__RAM2_SIZE/$$RAM2_SIZE_B/g" |\
sed -e "s/__RAM3_SIZE/$$RAM3_SIZE_B/g" |\
sed -e "s/__SDRAM_SIZE/$$SDRAM_SIZE_B/g" \
>$@
kernel.elf: $(LIB-y) $(OBJS-y) kernel/$(BOARD)/$(BOARD).ld
@$(CC) -o $@ -Tkernel/$(BOARD)/$(BOARD).ld -Wl,--start-group $(OBJS-y) $(LIB-y) -Wl,--end-group \
-Wl,-Map,kernel.map $(LDFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
qemudbg: image.bin
qemu-system-arm -M lm3s6965evb --kernel image.bin -nographic -S -gdb tcp::3333
qemu: image.bin
qemu-system-arm -M lm3s6965evb --kernel image.bin -nographic
qemu2: qemu
qemunet:
sudo qemu-system-arm -M lm3s6965evb --kernel image.bin -nographic -net nic,vlan=0 -net tap,vlan=0,ifname=frost0
qemunetdbg:
sudo qemu-system-arm -M lm3s6965evb --kernel image.bin -nographic -S -gdb tcp::3333 -net nic,vlan=0 -net tap,vlan=0,ifname=frost0
qemubridgedbg:
qemu-system-arm -M lm3s6965evb --kernel image.bin -nographic -S -gdb tcp::3333 -net nic,vlan=0 -net tap,helper=$(HOME)/frosted-qemu/qemu-bin/libexec/qemu-bridge-helper
qemubridge:
qemu-system-arm -M lm3s6965evb --kernel image.bin -nographic -net nic,vlan=0 -net tap,helper=$(HOME)/frosted-qemu/qemu-bin/libexec/qemu-bridge-helper
menuconfig:
@$(MAKE) -C kconfig/ menuconfig -f Makefile.frosted
config:
@$(MAKE) -C kconfig/ config -f Makefile.frosted
defconfig: FORCE
@test $(TARGET) || (echo "ERROR: you must define a target" && false)
@cp -i defconfig/$(TARGET).config kconfig/.config
malloc_test:
@gcc -o malloc.test kernel/malloc.c -DCONFIG_KRAM_SIZE=4
libclean: clean
@make -C kernel/unicore-mx clean PREFIX=arm-frosted-eabi
clean:
@rm -f malloc.test
@rm -f kernel/$(BOARD)/$(BOARD).ld
@make -C $(USERSPACE) clean
@rm -f $(OBJS-y)
@rm -f *.map *.bin *.elf *.img
@rm -f kernel/$(BOARD)/$(BOARD).ld
@rm -rf build
@rm -f tags
@rm -f kernel/syscall_table.c
================================================
FILE: README.md
================================================
# Frosted :snowman:
## We moved to gitlab!
Please visit [Frosted OS](https://gitlab.com/insane-adding-machines/frosted) and [Insane Adding Machines](https://gitlab.com/insane-adding-machines/) new homes!
Bye!
_the frosted development team_
================================================
FILE: defconfig/lpc1769.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
ARCH_LPC17XX=y
# ARCH_STM32F4 is not set
# ARCH_STM32F7 is not set
# ARCH_LPC1763 is not set
# ARCH_LPC1764 is not set
# ARCH_LPC1765 is not set
# ARCH_LPC1766 is not set
# ARCH_LPC1767 is not set
# ARCH_LPC1768 is not set
ARCH_LPC1769=y
FLASH_SIZE_512KB=y
RAM_SIZE_32KB=y
# CLK_100MHZ is not set
CLK_120MHZ=y
MACH_LPC1679XPRESSO=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=32
# TASK_STACK_SIZE_1K is not set
TASK_STACK_SIZE_2K=y
# TASK_STACK_SIZE_4K is not set
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
STRACE=y
#
# Filesystems
#
SYSFS=y
MEMFS=y
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
# DEVNULL is not set
DEVUART=y
UART_0=y
# UART_1 is not set
# UART_2 is not set
# UART_3 is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/lpc17xx.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
ARCH_LPC17XX=y
# ARCH_STM32F4 is not set
# ARCH_STM32F7 is not set
# ARCH_LPC1763 is not set
# ARCH_LPC1764 is not set
# ARCH_LPC1765 is not set
# ARCH_LPC1766 is not set
# ARCH_LPC1767 is not set
ARCH_LPC1768=y
# ARCH_LPC1769 is not set
FLASH_SIZE_512KB=y
RAM_SIZE_32KB=y
CLK_100MHZ=y
# MACH_LPC1768MBED is not set
MACH_SEEEDPRO=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=32
#
# IPC features
#
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
STRACE=y
# TASK_STACK_SIZE_1K is not set
TASK_STACK_SIZE_2K=y
# TASK_STACK_SIZE_4K is not set
# TASK_STACK_SIZE_8K is not set
#
# Filesystems
#
SYSFS=y
MEMFS=y
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
# DEVNULL is not set
DEVUART=y
UART_0=y
# UART_1 is not set
# UART_2 is not set
# UART_3 is not set
DEVGPIO=y
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/qemu-orig.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
ARCH_LM3S=y
# ARCH_LPC17XX is not set
# ARCH_STM32F4 is not set
# ARCH_STM32F7 is not set
ARCH_LM3S6965=y
# ARCH_LM3SVIRT is not set
FLASH_SIZE_256KB=y
RAM_SIZE_64KB=y
MACH_LM3S6965EVB=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=64
KRAMMEM_SIZE=32
# TASK_STACK_SIZE_1K is not set
TASK_STACK_SIZE_2K=y
# TASK_STACK_SIZE_4K is not set
# TASK_STACK_SIZE_8K is not set
MPU=y
#
# IPC features
#
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
# STRACE is not set
#
# Filesystems
#
SYSFS=y
# MEMFS is not set
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
# DEVNULL is not set
DEVUART=y
USART_0=y
# USART_1 is not set
# USART_2 is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/qemu.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
ARCH_LM3S=y
# ARCH_LPC17XX is not set
# ARCH_STM32F4 is not set
# ARCH_STM32F7 is not set
# ARCH_LM3S6965 is not set
ARCH_LM3SVIRT=y
FLASH_SIZE_1MB=y
RAM_SIZE_256KB=y
MACH_LM3SVIRT=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=128
# TASK_STACK_SIZE_1K is not set
# TASK_STACK_SIZE_2K is not set
TASK_STACK_SIZE_4K=y
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
# STRACE is not set
#
# Filesystems
#
SYSFS=y
# MEMFS is not set
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
USART_0=y
# USART_1 is not set
# USART_2 is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/qemunet.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
ARCH_LM3S=y
# ARCH_LPC17XX is not set
# ARCH_STM32F4 is not set
# ARCH_STM32F7 is not set
# ARCH_LM3S6965 is not set
ARCH_LM3SVIRT=y
FLASH_SIZE_1MB=y
RAM_SIZE_256KB=y
MACH_LM3SVIRT=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=64
# TASK_STACK_SIZE_1K is not set
TASK_STACK_SIZE_2K=y
# TASK_STACK_SIZE_4K is not set
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
# STRACE is not set
#
# Filesystems
#
SYSFS=y
# MEMFS is not set
XIPFS=y
# FATFS is not set
#
# Networking
#
SOCK_INET=y
# TCPIP_MEMPOOL_YN is not set
PICOTCP=y
#
# picoTCP configuration
#
CONFIG_PICOTCP_IPV4=y
# CONFIG_PICOTCP_IPV6 is not set
CONFIG_PICOTCP_TCP=y
CONFIG_PICOTCP_UDP=y
CONFIG_PICOTCP_DNS=y
# CONFIG_PICOTCP_MCAST is not set
# CONFIG_PICOTCP_NAT is not set
# CONFIG_PICOTCP_IPFILTER is not set
CONFIG_PICOTCP_LOOP=y
# CONFIG_PICOTCP_DEBUG is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
USART_0=y
# USART_1 is not set
# USART_2 is not set
DEVLM3SETH=y
ETH_DEFAULT_IP="192.168.20.150"
ETH_DEFAULT_NM="255.255.255.0"
ETH_DEFAULT_GW="192.168.20.1"
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/stm32f407-discovery.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
# ARCH_LPC17XX is not set
ARCH_STM32F4=y
# ARCH_STM32F7 is not set
# ARCH_STM32F401_XB is not set
# ARCH_STM32F401_XC is not set
# ARCH_STM32F401_XD is not set
# ARCH_STM32F401_XE is not set
# ARCH_STM32F405_XG is not set
# ARCH_STM32F405_XE is not set
ARCH_STM32F407_XG=y
# ARCH_STM32F407_XE is not set
# ARCH_STM32F411_XE is not set
# ARCH_STM32F411_XC is not set
# ARCH_STM32F429_XE is not set
# ARCH_STM32F429_XG is not set
# ARCH_STM32F429_XI is not set
# ARCH_STM32F446_ZE is not set
FLASH_SIZE_1MB=y
RAM_SIZE_192KB=y
ARCH_STM32F407=y
DEVSTM32DMA=y
# CLK_120MHZ is not set
CLK_168MHZ=y
MACH_STM32F407Discovery=y
# STM32F4_SDRAM is not set
#
# Kernel Configuration
#
KFLASHMEM_SIZE=192
KRAMMEM_SIZE=128
# TASK_STACK_SIZE_1K is not set
# TASK_STACK_SIZE_2K is not set
TASK_STACK_SIZE_4K=y
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
SOCK_UNIX=y
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
# STRACE is not set
#
# Filesystems
#
SYSFS=y
MEMFS=y
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
# USART_1 is not set
USART_2=y
# USART_3 is not set
# USART_6 is not set
DEVF4DSP=y
DEVSTM32USB=y
DEVSTM32USBFS=y
USBFS_HOST=y
# USBFS_GUEST is not set
# DEVTIM is not set
# DEVADC is not set
# DEVSTM32SDIO is not set
# DEVSTM32I2C is not set
# DEVSPI is not set
# DEV_RANDOM is not set
# DEVFRAMEBUFFER is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/stm32f429i-discovery.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
# ARCH_LPC17XX is not set
ARCH_STM32F4=y
# ARCH_STM32F7 is not set
# ARCH_STM32F401_XB is not set
# ARCH_STM32F401_XC is not set
# ARCH_STM32F401_XD is not set
# ARCH_STM32F401_XE is not set
# ARCH_STM32F405_XG is not set
# ARCH_STM32F405_XE is not set
# ARCH_STM32F407_XG is not set
# ARCH_STM32F407_XE is not set
# ARCH_STM32F411_XE is not set
# ARCH_STM32F411_XC is not set
# ARCH_STM32F429_XE is not set
# ARCH_STM32F429_XG is not set
ARCH_STM32F429_XI=y
# ARCH_STM32F446_ZE is not set
FLASH_SIZE_2MB=y
RAM_SIZE_256KB=y
ARCH_STM32F429=y
# CLK_48MHZ is not set
# CLK_84MHZ is not set
CLK_168MHZ=y
MACH_STM32F429Discovery=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=64
# TASK_STACK_SIZE_1K is not set
TASK_STACK_SIZE_2K=y
# TASK_STACK_SIZE_4K is not set
# TASK_STACK_SIZE_8K is not set
MPU=y
#
# IPC features
#
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
KLOG=y
KLOG_SIZE=256
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
# STRACE is not set
#
# Filesystems
#
SYSFS=y
MEMFS=y
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
USART_1=y
# USART_2 is not set
# DEVF4DSP is not set
# DEVSTM32USB is not set
# DEVTIM is not set
# DEVADC is not set
# DEVSTM32SDIO is not set
# DEVSTM32I2C is not set
# DEVSPI is not set
# DEV_RANDOM is not set
# DEVRNG is not set
# DEVFRAND is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/stm32f746-discovery.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
# ARCH_LPC17XX is not set
# ARCH_STM32F4 is not set
ARCH_STM32F7=y
ARCH_STM32F746_NG=y
# ARCH_STM32F769_NI is not set
FLASH_SIZE_1MB=y
RAM_SIZE_320KB=y
ARCH_STM32F746=y
CLK_216MHZ=y
MACH_STM32F746Discovery=y
# MACH_STM32F746Nucleo144 is not set
STM32F7_SDRAM=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=256
KRAMMEM_SIZE=256
# TASK_STACK_SIZE_1K is not set
# TASK_STACK_SIZE_2K is not set
TASK_STACK_SIZE_4K=y
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
STRACE=y
#
# Filesystems
#
SYSFS=y
# MEMFS is not set
XIPFS=y
FATFS=y
FAT32=y
FAT16=y
#
# Networking
#
SOCK_INET=y
# TCPIP_MEMPOOL_YN is not set
PICOTCP=y
#
# picoTCP configuration
#
CONFIG_PICOTCP_IPV4=y
# CONFIG_PICOTCP_IPV6 is not set
CONFIG_PICOTCP_TCP=y
CONFIG_PICOTCP_UDP=y
CONFIG_PICOTCP_DNS=y
# CONFIG_PICOTCP_MCAST is not set
# CONFIG_PICOTCP_NAT is not set
# CONFIG_PICOTCP_IPFILTER is not set
CONFIG_PICOTCP_LOOP=y
# CONFIG_PICOTCP_DEBUG is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
# USART_1 is not set
# USART_2 is not set
# USART_3 is not set
USART_6=y
DEVSTM32USB=y
DEVSTM32USBFS=y
# USBFS_HOST is not set
USBFS_GUEST=y
# DEVSTM32USBHS is not set
DEV_USB_ETH=y
USB_DEFAULT_IP="192.168.6.150"
USB_DEFAULT_NM="255.255.255.0"
USB_DEFAULT_GW="192.168.6.1"
# DEVTIM is not set
# DEVF7ETH is not set
DEVSTM32SDIO=y
# DEVSTM32I2C is not set
# DEVSPI is not set
# DEV_RANDOM is not set
DEVFRAMEBUFFER=y
DEVFBCON=y
FONT_CGA_8X8=y
# FONT_PICCOLO_7X6 is not set
DEVF7DISCOLTDC=y
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/stm32f746-nucleo.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
# ARCH_LPC17XX is not set
# ARCH_STM32F4 is not set
ARCH_STM32F7=y
ARCH_STM32F746_NG=y
# ARCH_STM32F769_NI is not set
FLASH_SIZE_1MB=y
RAM_SIZE_320KB=y
ARCH_STM32F746=y
CLK_216MHZ=y
# MACH_STM32F746Discovery is not set
MACH_STM32F746Nucleo144=y
# STM32F7_SDRAM is not set
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=32
# TASK_STACK_SIZE_1K is not set
TASK_STACK_SIZE_2K=y
# TASK_STACK_SIZE_4K is not set
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
# KLOG is not set
MEMFAULT_DBG=y
# HARDFAULT_DBG is not set
STRACE=y
#
# Filesystems
#
SYSFS=y
# MEMFS is not set
XIPFS=y
# FATFS is not set
#
# Networking
#
# SOCK_INET is not set
# TCPIP_MEMPOOL_YN is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
# USART_1 is not set
# USART_2 is not set
# USART_3 is not set
USART_6=y
DEVSTM32USB=y
DEVSTM32USBFS=y
USBFS_HOST=y
# USBFS_GUEST is not set
# DEVSTM32USBHS is not set
# DEVTIM is not set
# DEVSTM32SDIO is not set
# DEVSTM32I2C is not set
# DEVSPI is not set
# DEV_RANDOM is not set
# DEVFRAMEBUFFER is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: defconfig/stm32f769-discovery.config
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Compiler options
#
GDB_CFLAG=y
OPTIMIZE_NONE=y
# OPTIMIZE_SIZE is not set
# OPTIMIZE_PERF is not set
#
# Platform Selection
#
# ARCH_LM3S is not set
# ARCH_LPC17XX is not set
# ARCH_STM32F4 is not set
ARCH_STM32F7=y
# ARCH_NRF51 is not set
# ARCH_STM32F746_NG is not set
ARCH_STM32F769_NI=y
FLASH_SIZE_2MB=y
RAM_SIZE_368KB=y
ARCH_STM32F769=y
CLK_216MHZ=y
MACH_STM32F769Discovery=y
# STM32F7_SDRAM is not set
#
# Kernel Configuration
#
KFLASHMEM_SIZE=128
KRAMMEM_SIZE=64
# TASK_STACK_SIZE_1K is not set
# TASK_STACK_SIZE_2K is not set
TASK_STACK_SIZE_4K=y
# TASK_STACK_SIZE_8K is not set
MPU=y
PTHREADS=y
SIGNALS=y
PIPE=y
# SOCK_UNIX is not set
#
# Debugging options
#
KLOG=y
KLOG_SIZE=256
MEMFAULT_DBG=y
HARDFAULT_DBG=y
# STRACE is not set
#
# Filesystems
#
SYSFS=y
MEMFS=y
XIPFS=y
FATFS=y
FAT32=y
FAT16=y
#
# Networking
#
SOCK_INET=y
# TCPIP_MEMPOOL_YN is not set
PICOTCP=y
#
# picoTCP configuration
#
CONFIG_PICOTCP_IPV4=y
# CONFIG_PICOTCP_IPV6 is not set
CONFIG_PICOTCP_TCP=y
CONFIG_PICOTCP_UDP=y
CONFIG_PICOTCP_DNS=y
# CONFIG_PICOTCP_MCAST is not set
# CONFIG_PICOTCP_NAT is not set
# CONFIG_PICOTCP_IPFILTER is not set
CONFIG_PICOTCP_LOOP=y
# CONFIG_PICOTCP_DEBUG is not set
#
# Device Drivers
#
DEVNULL=y
DEVUART=y
# USART_1 is not set
# USART_2 is not set
# USART_3 is not set
USART_6=y
# DEVSTM32USBHS is not set
DEVF7ETH=y
ETH_DEFAULT_IP="192.168.2.151"
ETH_DEFAULT_NM="255.255.255.0"
ETH_DEFAULT_GW="192.168.2.1"
DEVSTM32SDIO=y
# DEVSPI is not set
# DEV_RANDOM is not set
# DEVFRAMEBUFFER is not set
#
# Power Management
#
#
# Power Management requires CPU Timer support
#
================================================
FILE: gdbinit.bflt
================================================
tar ext :3333
monitor reset
layout src
symbol-file
file kernel.elf
add-symbol-file ./frosted-mini-userspace-bflt/init.gdb 0x20090 -s .data 0x20008014 -s .bss 0x2000813c
add-symbol-file frosted-mini-userspace-bflt/idling.gdb 0x20a84 -s .data 0x2000815c -s .bss 0x200081ac
add-symbol-file frosted-mini-userspace-bflt/fresh.gdb 0x21334 -s .data 0x200081f8 -s .bss 0x20008b84
add-symbol-file frosted-mini-userspace-bflt/binutils.gdb 0x18de0 -s .data 0x2000acf0 -s .bss 0x2000c610
mon reset
mon halt
stepi
focus c
================================================
FILE: gdbinit.mini
================================================
tar ext :3333
monitor reset
layout src
symbol-file
file kernel.elf
mon reset
mon halt
stepi
focus c
================================================
FILE: include/frosted_api.h
================================================
#ifndef INC_FROSTED_API
#define INC_FROSTED_API
#include "stdint.h"
#define INIT __attribute__((section(".init")))
/* Constants */
/* move to limits.h ? */
#define MAXPATHLEN 256
#define ARG_MAX 32
/* open */
#include <sys/_default_fcntl.h>
/* seek */
#define SEEK_SET 0
#define SEEK_CUR 1
#define SEEK_END 2
/* syslog */
#define LOG_EMERG 0 /* system is unusable */
#define LOG_ALERT 1 /* action must be taken immediately */
#define LOG_CRIT 2 /* critical conditions */
#define LOG_ERR 3 /* error conditions */
#define LOG_WARNING 4 /* warning conditions */
#define LOG_NOTICE 5 /* normal but significant condition */
#define LOG_INFO 6 /* informational */
#define LOG_DEBUG 7 /* debug-level messages */
/* opendir - readdir */
typedef void DIR;
/* semaphore */
struct semaphore;
typedef struct semaphore sem_t;
typedef struct semaphore mutex_t;
#define MAX_FILE 64
struct dirent {
uint32_t d_ino;
char d_name[MAX_FILE];
};
/*
#define S_IFMT 0170000 // bit mask for the file type bit fields
#define P_IFMT 0000007 // bit mask for file permissions
*/
#define P_EXEC 0000001 // exec
/* for unix sockets */
#ifndef __frosted__
#define AF_UNIX 0
#define SOCK_STREAM 6
#define SOCK_DGRAM 17
#endif
struct __attribute__((packed)) sockaddr {
uint16_t sa_family;
uint8_t sa_zero[14];
};
struct __attribute__((packed)) sockaddr_un {
uint16_t sun_family;
uint8_t sun_path[MAX_FILE - 2];
};
struct sockaddr_env {
struct sockaddr *se_addr;
unsigned int se_len;
};
extern int errno;
#endif
================================================
FILE: kconfig/.gitignore
================================================
#
# Generated files
#
config*
*.lex.c
*.tab.c
*.tab.h
zconf.hash.c
*.moc
gconf.glade.h
*.pot
*.mo
#
# configuration programs
#
conf
mconf
nconf
qconf
gconf
kxgettext
================================================
FILE: kconfig/Kconfig
================================================
mainmenu "FROSTED Kernel Configuration"
source ../kernel/Kconfig
================================================
FILE: kconfig/Makefile
================================================
# ===========================================================================
# Kernel configuration targets
# These targets are used from top-level makefile
PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
localmodconfig localyesconfig
ifdef KBUILD_KCONFIG
Kconfig := $(KBUILD_KCONFIG)
else
Kconfig := Kconfig
endif
# We need this, in case the user has it in its environment
unexport CONFIG_
xconfig: $(obj)/qconf
$< $(Kconfig)
gconfig: $(obj)/gconf
$< $(Kconfig)
menuconfig: $(obj)/mconf
echo obj is $(obj)
echo Executing $<
$< $(Kconfig)
config: $(obj)/conf
$< --oldaskconfig $(Kconfig)
nconfig: $(obj)/nconf
$< $(Kconfig)
oldconfig: $(obj)/conf
$< --$@ $(Kconfig)
silentoldconfig: $(obj)/conf
$(Q)mkdir -p include/generated
$< --$@ $(Kconfig)
localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf
$(Q)mkdir -p include/generated
$(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config
$(Q)if [ -f .config ]; then \
cmp -s .tmp.config .config || \
(mv -f .config .config.old.1; \
mv -f .tmp.config .config; \
$(obj)/conf --silentoldconfig $(Kconfig); \
mv -f .config.old.1 .config.old) \
else \
mv -f .tmp.config .config; \
$(obj)/conf --silentoldconfig $(Kconfig); \
fi
$(Q)rm -f .tmp.config
# Create new linux.pot file
# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files
update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
$(Q)echo " GEN config.pot"
$(Q)xgettext --default-domain=linux \
--add-comments --keyword=_ --keyword=N_ \
--from-code=UTF-8 \
--files-from=$(srctree)/scripts/kconfig/POTFILES.in \
--directory=$(srctree) --directory=$(objtree) \
--output $(obj)/config.pot
$(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
$(Q)(for i in `ls $(srctree)/arch/*/Kconfig \
$(srctree)/arch/*/um/Kconfig`; \
do \
echo " GEN $$i"; \
$(obj)/kxgettext $$i \
>> $(obj)/config.pot; \
done )
$(Q)echo " GEN linux.pot"
$(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
--output $(obj)/linux.pot
$(Q)rm -f $(obj)/config.pot
PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf
$< --$@ $(Kconfig)
PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig
listnewconfig olddefconfig: $(obj)/conf
$< --$@ $(Kconfig)
# oldnoconfig is an alias of olddefconfig, because people already are dependent
# on its behavior(sets new symbols to their default value but not 'n') with the
# counter-intuitive name.
oldnoconfig: $(obj)/conf
$< --olddefconfig $(Kconfig)
savedefconfig: $(obj)/conf
$< --$@=defconfig $(Kconfig)
defconfig: $(obj)/conf
ifeq ($(KBUILD_DEFCONFIG),)
$< --defconfig $(Kconfig)
else
@echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
$(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
endif
%_defconfig: $(obj)/conf
$(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
# Help text used by make help
help:
@echo ' config - Update current config utilising a line-oriented program'
@echo ' nconfig - Update current config utilising a ncurses menu based program'
@echo ' menuconfig - Update current config utilising a menu based program'
@echo ' xconfig - Update current config utilising a QT based front-end'
@echo ' gconfig - Update current config utilising a GTK based front-end'
@echo ' oldconfig - Update current config utilising a provided .config as base'
@echo ' localmodconfig - Update current config disabling modules not loaded'
@echo ' localyesconfig - Update current config converting local mods to core'
@echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps'
@echo ' defconfig - New config with default from ARCH supplied defconfig'
@echo ' savedefconfig - Save current config as ./defconfig (minimal config)'
@echo ' allnoconfig - New config where all options are answered with no'
@echo ' allyesconfig - New config where all options are accepted with yes'
@echo ' allmodconfig - New config selecting modules when possible'
@echo ' alldefconfig - New config with all symbols set to default'
@echo ' randconfig - New config with random answer to all options'
@echo ' listnewconfig - List new options'
@echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
# lxdialog stuff
check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
# Use recursively expanded variables so we do not call gcc unless
# we really need to do so. (Do not call gcc as part of make mrproper)
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
-DLOCALE
# ===========================================================================
# Shared Makefile for the various kconfig executables:
# conf: Used for defconfig, oldconfig and related targets
# nconf: Used for the nconfig target.
# Utilizes ncurses
# mconf: Used for the menuconfig target
# Utilizes the lxdialog package
# qconf: Used for the xconfig target
# Based on QT which needs to be installed to compile it
# gconf: Used for the gconfig target
# Based on GTK which needs to be installed to compile it
# object files used by all kconfig flavours
lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o
lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
conf-objs := conf.o zconf.tab.o
mconf-objs := mconf.o zconf.tab.o $(lxdialog)
nconf-objs := nconf.o zconf.tab.o nconf.gui.o
kxgettext-objs := kxgettext.o zconf.tab.o
qconf-cxxobjs := qconf.o
qconf-objs := zconf.tab.o
gconf-objs := gconf.o zconf.tab.o
hostprogs-y := conf
ifeq ($(MAKECMDGOALS),nconfig)
hostprogs-y += nconf
endif
ifeq ($(MAKECMDGOALS),menuconfig)
hostprogs-y += mconf
endif
ifeq ($(MAKECMDGOALS),update-po-config)
hostprogs-y += kxgettext
endif
ifeq ($(MAKECMDGOALS),xconfig)
qconf-target := 1
endif
ifeq ($(MAKECMDGOALS),gconfig)
gconf-target := 1
endif
ifeq ($(qconf-target),1)
hostprogs-y += qconf
endif
ifeq ($(gconf-target),1)
hostprogs-y += gconf
endif
clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h
clean-files += mconf qconf gconf nconf
clean-files += config.pot linux.pot
# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
PHONY += $(obj)/dochecklxdialog
$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
$(obj)/dochecklxdialog:
$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
always := dochecklxdialog
# Add environment specific flags
HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS))
# generated files seem to need this to find local include files
HOSTCFLAGS_zconf.lex.o := -I$(src)
HOSTCFLAGS_zconf.tab.o := -I$(src)
LEX_PREFIX_zconf := zconf
YACC_PREFIX_zconf := zconf
HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
-Wno-missing-prototypes
HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
HOSTLOADLIBES_nconf = $(shell \
pkg-config --libs menu panel ncurses 2>/dev/null \
|| echo "-lmenu -lpanel -lncurses" )
$(obj)/qconf.o: $(obj)/.tmp_qtcheck
ifeq ($(qconf-target),1)
$(obj)/.tmp_qtcheck: $(src)/Makefile
-include $(obj)/.tmp_qtcheck
# QT needs some extra effort...
$(obj)/.tmp_qtcheck:
@set -e; echo " CHECK qt"; dir=""; pkg=""; \
if ! pkg-config --exists QtCore 2> /dev/null; then \
echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
pkg-config --exists qt 2> /dev/null && pkg=qt; \
pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
if [ -n "$$pkg" ]; then \
cflags="\$$(shell pkg-config $$pkg --cflags)"; \
libs="\$$(shell pkg-config $$pkg --libs)"; \
moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
dir="$$(pkg-config $$pkg --variable=prefix)"; \
else \
for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
done; \
if [ -z "$$dir" ]; then \
echo >&2 "*"; \
echo >&2 "* Unable to find any QT installation. Please make sure that"; \
echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \
echo >&2 "* either qmake can be found or install pkg-config or set"; \
echo >&2 "* the QTDIR environment variable to the correct location."; \
echo >&2 "*"; \
false; \
fi; \
libpath=$$dir/lib; lib=qt; osdir=""; \
$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
test -f $$libpath/libqt-mt.so && lib=qt-mt; \
cflags="-I$$dir/include"; \
libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
moc="$$dir/bin/moc"; \
fi; \
if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
echo "*"; \
echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
echo "*"; \
moc="/usr/bin/moc"; \
fi; \
else \
cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
[ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
fi; \
echo "KC_QT_CFLAGS=$$cflags" > $@; \
echo "KC_QT_LIBS=$$libs" >> $@; \
echo "KC_QT_MOC=$$moc" >> $@
endif
$(obj)/gconf.o: $(obj)/.tmp_gtkcheck
ifeq ($(gconf-target),1)
-include $(obj)/.tmp_gtkcheck
# GTK needs some extra effort, too...
$(obj)/.tmp_gtkcheck:
@if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \
if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \
touch $@; \
else \
echo >&2 "*"; \
echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \
echo >&2 "*"; \
false; \
fi \
else \
echo >&2 "*"; \
echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \
echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \
echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \
echo >&2 "*"; \
false; \
fi
endif
$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
$(obj)/qconf.o: $(obj)/qconf.moc
quiet_cmd_moc = MOC $@
cmd_moc = $(KC_QT_MOC) -i $< -o $@
$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck
$(call cmd,moc)
# Extract gconf menu items for I18N support
$(obj)/gconf.glade.h: $(obj)/gconf.glade
$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
$(obj)/gconf.glade
================================================
FILE: kconfig/Makefile.frosted
================================================
src := .
top_srcdir=../../
top_builddir=../../
srctree := .
obj ?= .
include Makefile
#HOSTCFLAGS+=-Dinline="" -include foo.h
#CFLAGS+=-DCURSES_LOC="<ncurses.h>"
#CFLAGS+=-DLOCALE
HOSTCC?=gcc
PATH:=$(PATH):.
-include $(obj)/.depend
$(obj)/.depend: $(wildcard *.h *.c)
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || :
__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
host-cmulti := $(foreach m,$(__hostprogs),\
$(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
host-cxxmulti := $(foreach m,$(__hostprogs),\
$(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),)))
host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs))))
host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))))
HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
$(host-csingle): %: %.c
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
$(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
$(obj)/%.o: %.c
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
$(obj)/%.o: $(obj)/%.c
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
$(obj)/%.o: %.cc
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@
$(obj)/%:: $(src)/%_shipped
$(Q)cat $< > $@
clean:
$(Q)rm -f $(addprefix $(obj)/,$(clean-files))
distclean: clean
$(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
$(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
mconf .depend)
FORCE:
.PHONY: FORCE clean distclean
================================================
FILE: kconfig/POTFILES.in
================================================
scripts/kconfig/lxdialog/checklist.c
scripts/kconfig/lxdialog/inputbox.c
scripts/kconfig/lxdialog/menubox.c
scripts/kconfig/lxdialog/textbox.c
scripts/kconfig/lxdialog/util.c
scripts/kconfig/lxdialog/yesno.c
scripts/kconfig/mconf.c
scripts/kconfig/conf.c
scripts/kconfig/confdata.c
scripts/kconfig/gconf.c
scripts/kconfig/gconf.glade.h
scripts/kconfig/qconf.cc
================================================
FILE: kconfig/STM32F4x1Discovery.cfg
================================================
#
# Automatically generated file; DO NOT EDIT.
# FROSTED Kernel Configuration
#
#
# Platform Selection
#
# ARCH_LM3S is not set
# ARCH_LPC17XX is not set
ARCH_STM32F4=y
# ARCH_STM32F401_XB is not set
# ARCH_STM32F401_XC is not set
# ARCH_STM32F401_XD is not set
# ARCH_STM32F401_XE is not set
# ARCH_STM32F405_XG is not set
# ARCH_STM32F405_XE is not set
# ARCH_STM32F407_XG is not set
# ARCH_STM32F407_XE is not set
ARCH_STM32F411_XE=y
# ARCH_STM32F411_XC is not set
# ARCH_STM32F429_XE is not set
# ARCH_STM32F429_XG is not set
# ARCH_STM32F429_XI is not set
FLASH_SIZE_512KB=y
RAM_SIZE_128KB=y
ARCH_STM32F411=y
CLK_48MHZ=y
# CLK_84MHZ is not set
MACH_STM32F4x1Discovery=y
#
# Kernel Configuration
#
KFLASHMEM_SIZE=48
KRAMMEM_SIZE=16
#
# Subsystems
#
#
# Filesystems
#
SYSFS=y
MEMFS=y
XIPFS=y
#
# Sockets
#
SOCK_UNIX=y
#
# Devices
#
DEVNULL=y
DEVUART=y
# USART_1 is not set
USART_2=y
# USART_6 is not set
DEVSPI=y
SPI_1=y
DEVL3GD20=y
DEVGPIO=y
#
# Applications
#
FRESH=y
# TASK2 is not set
# PRODCONS is not set
================================================
FILE: kconfig/check.sh
================================================
#!/bin/sh
# Needed for systems without gettext
$* -x c -o /dev/null - > /dev/null 2>&1 << EOF
#include <libintl.h>
int main()
{
gettext("");
return 0;
}
EOF
if [ ! "$?" -eq "0" ]; then
echo -DKBUILD_NO_NLS;
fi
================================================
FILE: kconfig/conf.c
================================================
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
*/
#include <locale.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
#include "lkc.h"
static void conf(struct menu *menu);
static void check_conf(struct menu *menu);
static void xfgets(char *str, int size, FILE *in);
enum input_mode {
oldaskconfig,
silentoldconfig,
oldconfig,
allnoconfig,
allyesconfig,
allmodconfig,
alldefconfig,
randconfig,
defconfig,
savedefconfig,
listnewconfig,
olddefconfig,
} input_mode = oldaskconfig;
static int indent = 1;
static int tty_stdio;
static int valid_stdin = 1;
static int sync_kconfig;
static int conf_cnt;
static char line[128];
static struct menu *rootEntry;
static void print_help(struct menu *menu)
{
struct gstr help = str_new();
menu_get_ext_help(menu, &help);
printf("\n%s\n", str_get(&help));
str_free(&help);
}
static void strip(char *str)
{
char *p = str;
int l;
while ((isspace(*p)))
p++;
l = strlen(p);
if (p != str)
memmove(str, p, l + 1);
if (!l)
return;
p = str + l - 1;
while ((isspace(*p)))
*p-- = 0;
}
static void check_stdin(void)
{
if (!valid_stdin) {
printf(_("aborted!\n\n"));
printf(_("Console input/output is redirected. "));
printf(_("Run 'make oldconfig' to update configuration.\n\n"));
exit(1);
}
}
static int conf_askvalue(struct symbol *sym, const char *def)
{
enum symbol_type type = sym_get_type(sym);
if (!sym_has_value(sym))
printf(_("(NEW) "));
line[0] = '\n';
line[1] = 0;
if (!sym_is_changable(sym)) {
printf("%s\n", def);
line[0] = '\n';
line[1] = 0;
return 0;
}
switch (input_mode) {
case oldconfig:
case silentoldconfig:
if (sym_has_value(sym)) {
printf("%s\n", def);
return 0;
}
check_stdin();
/* fall through */
case oldaskconfig:
fflush(stdout);
xfgets(line, 128, stdin);
if (!tty_stdio)
printf("\n");
return 1;
default:
break;
}
switch (type) {
case S_INT:
case S_HEX:
case S_STRING:
printf("%s\n", def);
return 1;
default:
;
}
printf("%s", line);
return 1;
}
static int conf_string(struct menu *menu)
{
struct symbol *sym = menu->sym;
const char *def;
while (1) {
printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
printf("(%s) ", sym->name);
def = sym_get_string_value(sym);
if (sym_get_string_value(sym))
printf("[%s] ", def);
if (!conf_askvalue(sym, def))
return 0;
switch (line[0]) {
case '\n':
break;
case '?':
/* print help */
if (line[1] == '\n') {
print_help(menu);
def = NULL;
break;
}
/* fall through */
default:
line[strlen(line)-1] = 0;
def = line;
}
if (def && sym_set_string_value(sym, def))
return 0;
}
}
static int conf_sym(struct menu *menu)
{
struct symbol *sym = menu->sym;
tristate oldval, newval;
while (1) {
printf("%*s%s ", indent - 1, "", _(menu->prompt->text));
if (sym->name)
printf("(%s) ", sym->name);
putchar('[');
oldval = sym_get_tristate_value(sym);
switch (oldval) {
case no:
putchar('N');
break;
case mod:
putchar('M');
break;
case yes:
putchar('Y');
break;
}
if (oldval != no && sym_tristate_within_range(sym, no))
printf("/n");
if (oldval != mod && sym_tristate_within_range(sym, mod))
printf("/m");
if (oldval != yes && sym_tristate_within_range(sym, yes))
printf("/y");
if (menu_has_help(menu))
printf("/?");
printf("] ");
if (!conf_askvalue(sym, sym_get_string_value(sym)))
return 0;
strip(line);
switch (line[0]) {
case 'n':
case 'N':
newval = no;
if (!line[1] || !strcmp(&line[1], "o"))
break;
continue;
case 'm':
case 'M':
newval = mod;
if (!line[1])
break;
continue;
case 'y':
case 'Y':
newval = yes;
if (!line[1] || !strcmp(&line[1], "es"))
break;
continue;
case 0:
newval = oldval;
break;
case '?':
goto help;
default:
continue;
}
if (sym_set_tristate_value(sym, newval))
return 0;
help:
print_help(menu);
}
}
static int conf_choice(struct menu *menu)
{
struct symbol *sym, *def_sym;
struct menu *child;
bool is_new;
sym = menu->sym;
is_new = !sym_has_value(sym);
if (sym_is_changable(sym)) {
conf_sym(menu);
sym_calc_value(sym);
switch (sym_get_tristate_value(sym)) {
case no:
return 1;
case mod:
return 0;
case yes:
break;
}
} else {
switch (sym_get_tristate_value(sym)) {
case no:
return 1;
case mod:
printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu)));
return 0;
case yes:
break;
}
}
while (1) {
int cnt, def;
printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu)));
def_sym = sym_get_choice_value(sym);
cnt = def = 0;
line[0] = 0;
for (child = menu->list; child; child = child->next) {
if (!menu_is_visible(child))
continue;
if (!child->sym) {
printf("%*c %s\n", indent, '*', _(menu_get_prompt(child)));
continue;
}
cnt++;
if (child->sym == def_sym) {
def = cnt;
printf("%*c", indent, '>');
} else
printf("%*c", indent, ' ');
printf(" %d. %s", cnt, _(menu_get_prompt(child)));
if (child->sym->name)
printf(" (%s)", child->sym->name);
if (!sym_has_value(child->sym))
printf(_(" (NEW)"));
printf("\n");
}
printf(_("%*schoice"), indent - 1, "");
if (cnt == 1) {
printf("[1]: 1\n");
goto conf_childs;
}
printf("[1-%d", cnt);
if (menu_has_help(menu))
printf("?");
printf("]: ");
switch (input_mode) {
case oldconfig:
case silentoldconfig:
if (!is_new) {
cnt = def;
printf("%d\n", cnt);
break;
}
check_stdin();
/* fall through */
case oldaskconfig:
fflush(stdout);
xfgets(line, 128, stdin);
strip(line);
if (line[0] == '?') {
print_help(menu);
continue;
}
if (!line[0])
cnt = def;
else if (isdigit(line[0]))
cnt = atoi(line);
else
continue;
break;
default:
break;
}
conf_childs:
for (child = menu->list; child; child = child->next) {
if (!child->sym || !menu_is_visible(child))
continue;
if (!--cnt)
break;
}
if (!child)
continue;
if (line[0] && line[strlen(line) - 1] == '?') {
print_help(child);
continue;
}
sym_set_choice_value(sym, child->sym);
for (child = child->list; child; child = child->next) {
indent += 2;
conf(child);
indent -= 2;
}
return 1;
}
}
static void conf(struct menu *menu)
{
struct symbol *sym;
struct property *prop;
struct menu *child;
if (!menu_is_visible(menu))
return;
sym = menu->sym;
prop = menu->prompt;
if (prop) {
const char *prompt;
switch (prop->type) {
case P_MENU:
if ((input_mode == silentoldconfig ||
input_mode == listnewconfig ||
input_mode == olddefconfig) &&
rootEntry != menu) {
check_conf(menu);
return;
}
/* fall through */
case P_COMMENT:
prompt = menu_get_prompt(menu);
if (prompt)
printf("%*c\n%*c %s\n%*c\n",
indent, '*',
indent, '*', _(prompt),
indent, '*');
default:
;
}
}
if (!sym)
goto conf_childs;
if (sym_is_choice(sym)) {
conf_choice(menu);
if (sym->curr.tri != mod)
return;
goto conf_childs;
}
switch (sym->type) {
case S_INT:
case S_HEX:
case S_STRING:
conf_string(menu);
break;
default:
conf_sym(menu);
break;
}
conf_childs:
if (sym)
indent += 2;
for (child = menu->list; child; child = child->next)
conf(child);
if (sym)
indent -= 2;
}
static void check_conf(struct menu *menu)
{
struct symbol *sym;
struct menu *child;
if (!menu_is_visible(menu))
return;
sym = menu->sym;
if (sym && !sym_has_value(sym)) {
if (sym_is_changable(sym) ||
(sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
if (input_mode == listnewconfig) {
if (sym->name && !sym_is_choice_value(sym)) {
printf("%s%s\n", CONFIG_, sym->name);
}
} else if (input_mode != olddefconfig) {
if (!conf_cnt++)
printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
}
}
for (child = menu->list; child; child = child->next)
check_conf(child);
}
static struct option long_opts[] = {
{"oldaskconfig", no_argument, NULL, oldaskconfig},
{"oldconfig", no_argument, NULL, oldconfig},
{"silentoldconfig", no_argument, NULL, silentoldconfig},
{"defconfig", optional_argument, NULL, defconfig},
{"savedefconfig", required_argument, NULL, savedefconfig},
{"allnoconfig", no_argument, NULL, allnoconfig},
{"allyesconfig", no_argument, NULL, allyesconfig},
{"allmodconfig", no_argument, NULL, allmodconfig},
{"alldefconfig", no_argument, NULL, alldefconfig},
{"randconfig", no_argument, NULL, randconfig},
{"listnewconfig", no_argument, NULL, listnewconfig},
{"olddefconfig", no_argument, NULL, olddefconfig},
/*
* oldnoconfig is an alias of olddefconfig, because people already
* are dependent on its behavior(sets new symbols to their default
* value but not 'n') with the counter-intuitive name.
*/
{"oldnoconfig", no_argument, NULL, olddefconfig},
{NULL, 0, NULL, 0}
};
static void conf_usage(const char *progname)
{
printf("Usage: %s [option] <kconfig-file>\n", progname);
printf("[option] is _one_ of the following:\n");
printf(" --listnewconfig List new options\n");
printf(" --oldaskconfig Start a new configuration using a line-oriented program\n");
printf(" --oldconfig Update a configuration using a provided .config as base\n");
printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n");
printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n");
printf(" --oldnoconfig An alias of olddefconfig\n");
printf(" --defconfig <file> New config with default defined in <file>\n");
printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n");
printf(" --allnoconfig New config where all options are answered with no\n");
printf(" --allyesconfig New config where all options are answered with yes\n");
printf(" --allmodconfig New config where all options are answered with mod\n");
printf(" --alldefconfig New config with all symbols set to default\n");
printf(" --randconfig New config with random answer to all options\n");
}
int main(int ac, char **av)
{
const char *progname = av[0];
int opt;
const char *name, *defconfig_file = NULL /* gcc uninit */;
struct stat tmpstat;
setlocale(LC_ALL, "");
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
tty_stdio = isatty(0) && isatty(1) && isatty(2);
while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) {
input_mode = (enum input_mode)opt;
switch (opt) {
case silentoldconfig:
sync_kconfig = 1;
break;
case defconfig:
case savedefconfig:
defconfig_file = optarg;
break;
case randconfig:
{
struct timeval now;
unsigned int seed;
char *seed_env;
/*
* Use microseconds derived seed,
* compensate for systems where it may be zero
*/
gettimeofday(&now, NULL);
seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1));
seed_env = getenv("KCONFIG_SEED");
if( seed_env && *seed_env ) {
char *endp;
int tmp = (int)strtol(seed_env, &endp, 0);
if (*endp == '\0') {
seed = tmp;
}
}
fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed );
srand(seed);
break;
}
case oldaskconfig:
case oldconfig:
case allnoconfig:
case allyesconfig:
case allmodconfig:
case alldefconfig:
case listnewconfig:
case olddefconfig:
break;
case '?':
conf_usage(progname);
exit(1);
break;
}
}
if (ac == optind) {
printf(_("%s: Kconfig file missing\n"), av[0]);
conf_usage(progname);
exit(1);
}
name = av[optind];
conf_parse(name);
//zconfdump(stdout);
if (sync_kconfig) {
name = conf_get_configname();
if (stat(name, &tmpstat)) {
fprintf(stderr, _("***\n"
"*** Configuration file \"%s\" not found!\n"
"***\n"
"*** Please run some configurator (e.g. \"make oldconfig\" or\n"
"*** \"make menuconfig\" or \"make xconfig\").\n"
"***\n"), name);
exit(1);
}
}
switch (input_mode) {
case defconfig:
if (!defconfig_file)
defconfig_file = conf_get_default_confname();
if (conf_read(defconfig_file)) {
printf(_("***\n"
"*** Can't find default configuration \"%s\"!\n"
"***\n"), defconfig_file);
exit(1);
}
break;
case savedefconfig:
case silentoldconfig:
case oldaskconfig:
case oldconfig:
case listnewconfig:
case olddefconfig:
conf_read(NULL);
break;
case allnoconfig:
case allyesconfig:
case allmodconfig:
case alldefconfig:
case randconfig:
name = getenv("KCONFIG_ALLCONFIG");
if (!name)
break;
if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) {
if (conf_read_simple(name, S_DEF_USER)) {
fprintf(stderr,
_("*** Can't read seed configuration \"%s\"!\n"),
name);
exit(1);
}
break;
}
switch (input_mode) {
case allnoconfig: name = "allno.config"; break;
case allyesconfig: name = "allyes.config"; break;
case allmodconfig: name = "allmod.config"; break;
case alldefconfig: name = "alldef.config"; break;
case randconfig: name = "allrandom.config"; break;
default: break;
}
if (conf_read_simple(name, S_DEF_USER) &&
conf_read_simple("all.config", S_DEF_USER)) {
fprintf(stderr,
_("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"),
name);
exit(1);
}
break;
default:
break;
}
if (sync_kconfig) {
if (conf_get_changed()) {
name = getenv("KCONFIG_NOSILENTUPDATE");
if (name && *name) {
fprintf(stderr,
_("\n*** The configuration requires explicit update.\n\n"));
return 1;
}
}
valid_stdin = tty_stdio;
}
switch (input_mode) {
case allnoconfig:
conf_set_all_new_symbols(def_no);
break;
case allyesconfig:
conf_set_all_new_symbols(def_yes);
break;
case allmodconfig:
conf_set_all_new_symbols(def_mod);
break;
case alldefconfig:
conf_set_all_new_symbols(def_default);
break;
case randconfig:
/* Really nothing to do in this loop */
while (conf_set_all_new_symbols(def_random)) ;
break;
case defconfig:
conf_set_all_new_symbols(def_default);
break;
case savedefconfig:
break;
case oldaskconfig:
rootEntry = &rootmenu;
conf(&rootmenu);
input_mode = silentoldconfig;
/* fall through */
case oldconfig:
case listnewconfig:
case olddefconfig:
case silentoldconfig:
/* Update until a loop caused no more changes */
do {
conf_cnt = 0;
check_conf(&rootmenu);
} while (conf_cnt &&
(input_mode != listnewconfig &&
input_mode != olddefconfig));
break;
}
if (sync_kconfig) {
/* silentoldconfig is used during the build so we shall update autoconf.
* All other commands are only used to generate a config.
*/
if (conf_get_changed() && conf_write(NULL)) {
fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
exit(1);
}
if (conf_write_autoconf()) {
fprintf(stderr, _("\n*** Error during update of the configuration.\n\n"));
return 1;
}
} else if (input_mode == savedefconfig) {
if (conf_write_defconfig(defconfig_file)) {
fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"),
defconfig_file);
return 1;
}
} else if (input_mode != listnewconfig) {
if (conf_write(NULL)) {
fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n"));
exit(1);
}
}
return 0;
}
/*
* Helper function to facilitate fgets() by Jean Sacren.
*/
void xfgets(char *str, int size, FILE *in)
{
if (fgets(str, size, in) == NULL)
fprintf(stderr, "\nError in reading or end of file.\n");
}
================================================
FILE: kconfig/confdata.c
================================================
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
*/
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "lkc.h"
static void conf_warning(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
static void conf_message(const char *fmt, ...)
__attribute__ ((format (printf, 1, 2)));
static const char *conf_filename;
static int conf_lineno, conf_warnings, conf_unsaved;
const char conf_defname[] = "arch/$ARCH/defconfig";
static void conf_warning(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno);
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
va_end(ap);
conf_warnings++;
}
static void conf_default_message_callback(const char *fmt, va_list ap)
{
printf("#\n# ");
vprintf(fmt, ap);
printf("\n#\n");
}
static void (*conf_message_callback) (const char *fmt, va_list ap) =
conf_default_message_callback;
void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap))
{
conf_message_callback = fn;
}
static void conf_message(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
if (conf_message_callback)
conf_message_callback(fmt, ap);
}
const char *conf_get_configname(void)
{
char *name = getenv("KCONFIG_CONFIG");
return name ? name : ".config";
}
const char *conf_get_autoconfig_name(void)
{
char *name = getenv("KCONFIG_AUTOCONFIG");
return name ? name : "include/config/auto.conf";
}
static char *conf_expand_value(const char *in)
{
struct symbol *sym;
const char *src;
static char res_value[SYMBOL_MAXLENGTH];
char *dst, name[SYMBOL_MAXLENGTH];
res_value[0] = 0;
dst = name;
while ((src = strchr(in, '$'))) {
strncat(res_value, in, src - in);
src++;
dst = name;
while (isalnum(*src) || *src == '_')
*dst++ = *src++;
*dst = 0;
sym = sym_lookup(name, 0);
sym_calc_value(sym);
strcat(res_value, sym_get_string_value(sym));
in = src;
}
strcat(res_value, in);
return res_value;
}
char *conf_get_default_confname(void)
{
struct stat buf;
static char fullname[PATH_MAX+1];
char *env, *name;
name = conf_expand_value(conf_defname);
env = getenv(SRCTREE);
if (env) {
sprintf(fullname, "%s/%s", env, name);
if (!stat(fullname, &buf))
return fullname;
}
return name;
}
static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p)
{
char *p2;
switch (sym->type) {
case S_TRISTATE:
if (p[0] == 'm') {
sym->def[def].tri = mod;
sym->flags |= def_flags;
break;
}
/* fall through */
case S_BOOLEAN:
if (p[0] == 'y') {
sym->def[def].tri = yes;
sym->flags |= def_flags;
break;
}
if (p[0] == 'n') {
sym->def[def].tri = no;
sym->flags |= def_flags;
break;
}
if (def != S_DEF_AUTO)
conf_warning("symbol value '%s' invalid for %s",
p, sym->name);
return 1;
case S_OTHER:
if (*p != '"') {
for (p2 = p; *p2 && !isspace(*p2); p2++)
;
sym->type = S_STRING;
goto done;
}
/* fall through */
case S_STRING:
if (*p++ != '"')
break;
for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) {
if (*p2 == '"') {
*p2 = 0;
break;
}
memmove(p2, p2 + 1, strlen(p2));
}
if (!p2) {
if (def != S_DEF_AUTO)
conf_warning("invalid string found");
return 1;
}
/* fall through */
case S_INT:
case S_HEX:
done:
if (sym_string_valid(sym, p)) {
sym->def[def].val = strdup(p);
sym->flags |= def_flags;
} else {
if (def != S_DEF_AUTO)
conf_warning("symbol value '%s' invalid for %s",
p, sym->name);
return 1;
}
break;
default:
;
}
return 0;
}
#define LINE_GROWTH 16
static int add_byte(int c, char **lineptr, size_t slen, size_t *n)
{
char *nline;
size_t new_size = slen + 1;
if (new_size > *n) {
new_size += LINE_GROWTH - 1;
new_size *= 2;
nline = realloc(*lineptr, new_size);
if (!nline)
return -1;
*lineptr = nline;
*n = new_size;
}
(*lineptr)[slen] = c;
return 0;
}
static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream)
{
char *line = *lineptr;
size_t slen = 0;
for (;;) {
int c = getc(stream);
switch (c) {
case '\n':
if (add_byte(c, &line, slen, n) < 0)
goto e_out;
slen++;
/* fall through */
case EOF:
if (add_byte('\0', &line, slen, n) < 0)
goto e_out;
*lineptr = line;
if (slen == 0)
return -1;
return slen;
default:
if (add_byte(c, &line, slen, n) < 0)
goto e_out;
slen++;
}
}
e_out:
line[slen-1] = '\0';
*lineptr = line;
return -1;
}
int conf_read_simple(const char *name, int def)
{
FILE *in = NULL;
char *line = NULL;
size_t line_asize = 0;
char *p, *p2;
struct symbol *sym;
int i, def_flags;
if (name) {
in = zconf_fopen(name);
} else {
struct property *prop;
name = conf_get_configname();
in = zconf_fopen(name);
if (in)
goto load;
sym_add_change_count(1);
if (!sym_defconfig_list) {
if (modules_sym)
sym_calc_value(modules_sym);
return 1;
}
for_all_defaults(sym_defconfig_list, prop) {
if (expr_calc_value(prop->visible.expr) == no ||
prop->expr->type != E_SYMBOL)
continue;
name = conf_expand_value(prop->expr->left.sym->name);
in = zconf_fopen(name);
if (in) {
conf_message(_("using defaults found in %s"),
name);
goto load;
}
}
}
if (!in)
return 1;
load:
conf_filename = name;
conf_lineno = 0;
conf_warnings = 0;
conf_unsaved = 0;
def_flags = SYMBOL_DEF << def;
for_all_symbols(i, sym) {
sym->flags |= SYMBOL_CHANGED;
sym->flags &= ~(def_flags|SYMBOL_VALID);
if (sym_is_choice(sym))
sym->flags |= def_flags;
switch (sym->type) {
case S_INT:
case S_HEX:
case S_STRING:
if (sym->def[def].val)
free(sym->def[def].val);
/* fall through */
default:
sym->def[def].val = NULL;
sym->def[def].tri = no;
}
}
while (compat_getline(&line, &line_asize, in) != -1) {
conf_lineno++;
sym = NULL;
if (line[0] == '#') {
if (memcmp(line + 2, CONFIG_, strlen(CONFIG_)))
continue;
p = strchr(line + 2 + strlen(CONFIG_), ' ');
if (!p)
continue;
*p++ = 0;
if (strncmp(p, "is not set", 10))
continue;
if (def == S_DEF_USER) {
sym = sym_find(line + 2 + strlen(CONFIG_));
if (!sym) {
sym_add_change_count(1);
goto setsym;
}
} else {
sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
if (sym->type == S_UNKNOWN)
sym->type = S_BOOLEAN;
}
if (sym->flags & def_flags) {
conf_warning("override: reassigning to symbol %s", sym->name);
}
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
sym->def[def].tri = no;
sym->flags |= def_flags;
break;
default:
;
}
} else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) {
p = strchr(line + strlen(CONFIG_), '=');
if (!p)
continue;
*p++ = 0;
p2 = strchr(p, '\n');
if (p2) {
*p2-- = 0;
if (*p2 == '\r')
*p2 = 0;
}
if (def == S_DEF_USER) {
sym = sym_find(line + strlen(CONFIG_));
if (!sym) {
sym_add_change_count(1);
goto setsym;
}
} else {
sym = sym_lookup(line + strlen(CONFIG_), 0);
if (sym->type == S_UNKNOWN)
sym->type = S_OTHER;
}
if (sym->flags & def_flags) {
conf_warning("override: reassigning to symbol %s", sym->name);
}
if (conf_set_sym_val(sym, def, def_flags, p))
continue;
} else {
if (line[0] != '\r' && line[0] != '\n')
conf_warning("unexpected data");
continue;
}
setsym:
if (sym && sym_is_choice_value(sym)) {
struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
switch (sym->def[def].tri) {
case no:
break;
case mod:
if (cs->def[def].tri == yes) {
conf_warning("%s creates inconsistent choice state", sym->name);
cs->flags &= ~def_flags;
}
break;
case yes:
if (cs->def[def].tri != no)
conf_warning("override: %s changes choice state", sym->name);
cs->def[def].val = sym;
break;
}
cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri);
}
}
free(line);
fclose(in);
if (modules_sym)
sym_calc_value(modules_sym);
return 0;
}
int conf_read(const char *name)
{
struct symbol *sym;
int i;
sym_set_change_count(0);
if (conf_read_simple(name, S_DEF_USER))
return 1;
for_all_symbols(i, sym) {
sym_calc_value(sym);
if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO))
continue;
if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
/* check that calculated value agrees with saved value */
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
break;
if (!sym_is_choice(sym))
continue;
/* fall through */
default:
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
continue;
break;
}
} else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE))
/* no previous value and not saved */
continue;
conf_unsaved++;
/* maybe print value in verbose mode... */
}
for_all_symbols(i, sym) {
if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
/* Reset values of generates values, so they'll appear
* as new, if they should become visible, but that
* doesn't quite work if the Kconfig and the saved
* configuration disagree.
*/
if (sym->visible == no && !conf_unsaved)
sym->flags &= ~SYMBOL_DEF_USER;
switch (sym->type) {
case S_STRING:
case S_INT:
case S_HEX:
/* Reset a string value if it's out of range */
if (sym_string_within_range(sym, sym->def[S_DEF_USER].val))
break;
sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
conf_unsaved++;
break;
default:
break;
}
}
}
sym_add_change_count(conf_warnings || conf_unsaved);
return 0;
}
/*
* Kconfig configuration printer
*
* This printer is used when generating the resulting configuration after
* kconfig invocation and `defconfig' files. Unset symbol might be omitted by
* passing a non-NULL argument to the printer.
*
*/
static void
kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
{
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
if (*value == 'n') {
bool skip_unset = (arg != NULL);
if (!skip_unset)
fprintf(fp, "# %s%s is not set\n",
CONFIG_, sym->name);
return;
}
break;
default:
break;
}
fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value);
}
static void
kconfig_print_comment(FILE *fp, const char *value, void *arg)
{
const char *p = value;
size_t l;
for (;;) {
l = strcspn(p, "\n");
fprintf(fp, "#");
if (l) {
fprintf(fp, " ");
xfwrite(p, l, 1, fp);
p += l;
}
fprintf(fp, "\n");
if (*p++ == '\0')
break;
}
}
static struct conf_printer kconfig_printer_cb =
{
.print_symbol = kconfig_print_symbol,
.print_comment = kconfig_print_comment,
};
/*
* Header printer
*
* This printer is used when generating the `include/generated/autoconf.h' file.
*/
static void
header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
{
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE: {
const char *suffix = "";
switch (*value) {
case 'n':
break;
case 'm':
suffix = "_MODULE";
/* fall through */
default:
fprintf(fp, "#define %s%s%s 1\n",
CONFIG_, sym->name, suffix);
}
break;
}
case S_HEX: {
const char *prefix = "";
if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X'))
prefix = "0x";
fprintf(fp, "#define %s%s %s%s\n",
CONFIG_, sym->name, prefix, value);
break;
}
case S_STRING:
case S_INT:
fprintf(fp, "#define %s%s %s\n",
CONFIG_, sym->name, value);
break;
default:
break;
}
}
static void
header_print_comment(FILE *fp, const char *value, void *arg)
{
const char *p = value;
size_t l;
fprintf(fp, "/*\n");
for (;;) {
l = strcspn(p, "\n");
fprintf(fp, " *");
if (l) {
fprintf(fp, " ");
xfwrite(p, l, 1, fp);
p += l;
}
fprintf(fp, "\n");
if (*p++ == '\0')
break;
}
fprintf(fp, " */\n");
}
static struct conf_printer header_printer_cb =
{
.print_symbol = header_print_symbol,
.print_comment = header_print_comment,
};
/*
* Tristate printer
*
* This printer is used when generating the `include/config/tristate.conf' file.
*/
static void
tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg)
{
if (sym->type == S_TRISTATE && *value != 'n')
fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value));
}
static struct conf_printer tristate_printer_cb =
{
.print_symbol = tristate_print_symbol,
.print_comment = kconfig_print_comment,
};
static void conf_write_symbol(FILE *fp, struct symbol *sym,
struct conf_printer *printer, void *printer_arg)
{
const char *str;
switch (sym->type) {
case S_OTHER:
case S_UNKNOWN:
break;
case S_STRING:
str = sym_get_string_value(sym);
str = sym_escape_string_value(str);
printer->print_symbol(fp, sym, str, printer_arg);
free((void *)str);
break;
default:
str = sym_get_string_value(sym);
printer->print_symbol(fp, sym, str, printer_arg);
}
}
static void
conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg)
{
char buf[256];
snprintf(buf, sizeof(buf),
"\n"
"Automatically generated file; DO NOT EDIT.\n"
"%s\n",
rootmenu.prompt->text);
printer->print_comment(fp, buf, printer_arg);
}
/*
* Write out a minimal config.
* All values that has default values are skipped as this is redundant.
*/
int conf_write_defconfig(const char *filename)
{
struct symbol *sym;
struct menu *menu;
FILE *out;
out = fopen(filename, "w");
if (!out)
return 1;
sym_clear_all_valid();
/* Traverse all menus to find all relevant symbols */
menu = rootmenu.list;
while (menu != NULL)
{
sym = menu->sym;
if (sym == NULL) {
if (!menu_is_visible(menu))
goto next_menu;
} else if (!sym_is_choice(sym)) {
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE))
goto next_menu;
sym->flags &= ~SYMBOL_WRITE;
/* If we cannot change the symbol - skip */
if (!sym_is_changable(sym))
goto next_menu;
/* If symbol equals to default value - skip */
if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0)
goto next_menu;
/*
* If symbol is a choice value and equals to the
* default for a choice - skip.
* But only if value is bool and equal to "y" and
* choice is not "optional".
* (If choice is "optional" then all values can be "n")
*/
if (sym_is_choice_value(sym)) {
struct symbol *cs;
struct symbol *ds;
cs = prop_get_symbol(sym_get_choice_prop(sym));
ds = sym_choice_default(cs);
if (!sym_is_optional(cs) && sym == ds) {
if ((sym->type == S_BOOLEAN) &&
sym_get_tristate_value(sym) == yes)
goto next_menu;
}
}
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
}
next_menu:
if (menu->list != NULL) {
menu = menu->list;
}
else if (menu->next != NULL) {
menu = menu->next;
} else {
while ((menu = menu->parent)) {
if (menu->next != NULL) {
menu = menu->next;
break;
}
}
}
}
fclose(out);
return 0;
}
int conf_write(const char *name)
{
FILE *out;
struct symbol *sym;
struct menu *menu;
const char *basename;
const char *str;
char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
char *env;
dirname[0] = 0;
if (name && name[0]) {
struct stat st;
char *slash;
if (!stat(name, &st) && S_ISDIR(st.st_mode)) {
strcpy(dirname, name);
strcat(dirname, "/");
basename = conf_get_configname();
} else if ((slash = strrchr(name, '/'))) {
int size = slash - name + 1;
memcpy(dirname, name, size);
dirname[size] = 0;
if (slash[1])
basename = slash + 1;
else
basename = conf_get_configname();
} else
basename = name;
} else
basename = conf_get_configname();
sprintf(newname, "%s%s", dirname, basename);
env = getenv("KCONFIG_OVERWRITECONFIG");
if (!env || !*env) {
sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
out = fopen(tmpname, "w");
} else {
*tmpname = 0;
out = fopen(newname, "w");
}
if (!out)
return 1;
conf_write_heading(out, &kconfig_printer_cb, NULL);
if (!conf_get_changed())
sym_clear_all_valid();
menu = rootmenu.list;
while (menu) {
sym = menu->sym;
if (!sym) {
if (!menu_is_visible(menu))
goto next;
str = menu_get_prompt(menu);
fprintf(out, "\n"
"#\n"
"# %s\n"
"#\n", str);
} else if (!(sym->flags & SYMBOL_CHOICE)) {
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE))
goto next;
sym->flags &= ~SYMBOL_WRITE;
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
}
next:
if (menu->list) {
menu = menu->list;
continue;
}
if (menu->next)
menu = menu->next;
else while ((menu = menu->parent)) {
if (menu->next) {
menu = menu->next;
break;
}
}
}
fclose(out);
if (*tmpname) {
strcat(dirname, basename);
strcat(dirname, ".old");
rename(newname, dirname);
if (rename(tmpname, newname))
return 1;
}
conf_message(_("configuration written to %s"), newname);
sym_set_change_count(0);
return 0;
}
static int conf_split_config(void)
{
const char *name;
char path[PATH_MAX+1];
char *s, *d, c;
struct symbol *sym;
struct stat sb;
int res, i, fd;
name = conf_get_autoconfig_name();
conf_read_simple(name, S_DEF_AUTO);
if (chdir("include/config"))
return 1;
res = 0;
for_all_symbols(i, sym) {
sym_calc_value(sym);
if ((sym->flags & SYMBOL_AUTO) || !sym->name)
continue;
if (sym->flags & SYMBOL_WRITE) {
if (sym->flags & SYMBOL_DEF_AUTO) {
/*
* symbol has old and new value,
* so compare them...
*/
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
if (sym_get_tristate_value(sym) ==
sym->def[S_DEF_AUTO].tri)
continue;
break;
case S_STRING:
case S_HEX:
case S_INT:
if (!strcmp(sym_get_string_value(sym),
sym->def[S_DEF_AUTO].val))
continue;
break;
default:
break;
}
} else {
/*
* If there is no old value, only 'no' (unset)
* is allowed as new value.
*/
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
if (sym_get_tristate_value(sym) == no)
continue;
break;
default:
break;
}
}
} else if (!(sym->flags & SYMBOL_DEF_AUTO))
/* There is neither an old nor a new value. */
continue;
/* else
* There is an old value, but no new value ('no' (unset)
* isn't saved in auto.conf, so the old value is always
* different from 'no').
*/
/* Replace all '_' and append ".h" */
s = sym->name;
d = path;
while ((c = *s++)) {
c = tolower(c);
*d++ = (c == '_') ? '/' : c;
}
strcpy(d, ".h");
/* Assume directory path already exists. */
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd == -1) {
if (errno != ENOENT) {
res = 1;
break;
}
/*
* Create directory components,
* unless they exist already.
*/
d = path;
while ((d = strchr(d, '/'))) {
*d = 0;
if (stat(path, &sb) && mkdir(path, 0755)) {
res = 1;
goto out;
}
*d++ = '/';
}
/* Try it again. */
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd == -1) {
res = 1;
break;
}
}
close(fd);
}
out:
if (chdir("../.."))
return 1;
return res;
}
int conf_write_autoconf(void)
{
struct symbol *sym;
const char *name;
FILE *out, *tristate, *out_h;
int i;
sym_clear_all_valid();
file_write_dep("include/config/auto.conf.cmd");
if (conf_split_config())
return 1;
out = fopen(".tmpconfig", "w");
if (!out)
return 1;
tristate = fopen(".tmpconfig_tristate", "w");
if (!tristate) {
fclose(out);
return 1;
}
out_h = fopen(".tmpconfig.h", "w");
if (!out_h) {
fclose(out);
fclose(tristate);
return 1;
}
conf_write_heading(out, &kconfig_printer_cb, NULL);
conf_write_heading(tristate, &tristate_printer_cb, NULL);
conf_write_heading(out_h, &header_printer_cb, NULL);
for_all_symbols(i, sym) {
sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE) || !sym->name)
continue;
/* write symbol to auto.conf, tristate and header files */
conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1);
conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1);
conf_write_symbol(out_h, sym, &header_printer_cb, NULL);
}
fclose(out);
fclose(tristate);
fclose(out_h);
name = getenv("KCONFIG_AUTOHEADER");
if (!name)
name = "include/generated/autoconf.h";
if (rename(".tmpconfig.h", name))
return 1;
name = getenv("KCONFIG_TRISTATE");
if (!name)
name = "include/config/tristate.conf";
if (rename(".tmpconfig_tristate", name))
return 1;
name = conf_get_autoconfig_name();
/*
* This must be the last step, kbuild has a dependency on auto.conf
* and this marks the successful completion of the previous steps.
*/
if (rename(".tmpconfig", name))
return 1;
return 0;
}
static int sym_change_count;
static void (*conf_changed_callback)(void);
void sym_set_change_count(int count)
{
int _sym_change_count = sym_change_count;
sym_change_count = count;
if (conf_changed_callback &&
(bool)_sym_change_count != (bool)count)
conf_changed_callback();
}
void sym_add_change_count(int count)
{
sym_set_change_count(count + sym_change_count);
}
bool conf_get_changed(void)
{
return sym_change_count;
}
void conf_set_changed_callback(void (*fn)(void))
{
conf_changed_callback = fn;
}
static bool randomize_choice_values(struct symbol *csym)
{
struct property *prop;
struct symbol *sym;
struct expr *e;
int cnt, def;
/*
* If choice is mod then we may have more items selected
* and if no then no-one.
* In both cases stop.
*/
if (csym->curr.tri != yes)
return false;
prop = sym_get_choice_prop(csym);
/* count entries in choice block */
cnt = 0;
expr_list_for_each_sym(prop->expr, e, sym)
cnt++;
/*
* find a random value and set it to yes,
* set the rest to no so we have only one set
*/
def = (rand() % cnt);
cnt = 0;
expr_list_for_each_sym(prop->expr, e, sym) {
if (def == cnt++) {
sym->def[S_DEF_USER].tri = yes;
csym->def[S_DEF_USER].val = sym;
}
else {
sym->def[S_DEF_USER].tri = no;
}
sym->flags |= SYMBOL_DEF_USER;
/* clear VALID to get value calculated */
sym->flags &= ~SYMBOL_VALID;
}
csym->flags |= SYMBOL_DEF_USER;
/* clear VALID to get value calculated */
csym->flags &= ~(SYMBOL_VALID);
return true;
}
void set_all_choice_values(struct symbol *csym)
{
struct property *prop;
struct symbol *sym;
struct expr *e;
prop = sym_get_choice_prop(csym);
/*
* Set all non-assinged choice values to no
*/
expr_list_for_each_sym(prop->expr, e, sym) {
if (!sym_has_value(sym))
sym->def[S_DEF_USER].tri = no;
}
csym->flags |= SYMBOL_DEF_USER;
/* clear VALID to get value calculated */
csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES);
}
bool conf_set_all_new_symbols(enum conf_def_mode mode)
{
struct symbol *sym, *csym;
int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y
* pty: probability of tristate = y
* ptm: probability of tristate = m
*/
pby = 50; pty = ptm = 33; /* can't go as the default in switch-case
* below, otherwise gcc whines about
* -Wmaybe-uninitialized */
if (mode == def_random) {
int n, p[3];
char *env = getenv("KCONFIG_PROBABILITY");
n = 0;
while( env && *env ) {
char *endp;
int tmp = strtol( env, &endp, 10 );
if( tmp >= 0 && tmp <= 100 ) {
p[n++] = tmp;
} else {
errno = ERANGE;
perror( "KCONFIG_PROBABILITY" );
exit( 1 );
}
env = (*endp == ':') ? endp+1 : endp;
if( n >=3 ) {
break;
}
}
switch( n ) {
case 1:
pby = p[0]; ptm = pby/2; pty = pby-ptm;
break;
case 2:
pty = p[0]; ptm = p[1]; pby = pty + ptm;
break;
case 3:
pby = p[0]; pty = p[1]; ptm = p[2];
break;
}
if( pty+ptm > 100 ) {
errno = ERANGE;
perror( "KCONFIG_PROBABILITY" );
exit( 1 );
}
}
bool has_changed = false;
for_all_symbols(i, sym) {
if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID))
continue;
switch (sym_get_type(sym)) {
case S_BOOLEAN:
case S_TRISTATE:
has_changed = true;
switch (mode) {
case def_yes:
sym->def[S_DEF_USER].tri = yes;
break;
case def_mod:
sym->def[S_DEF_USER].tri = mod;
break;
case def_no:
if (sym->flags & SYMBOL_ALLNOCONFIG_Y)
sym->def[S_DEF_USER].tri = yes;
else
sym->def[S_DEF_USER].tri = no;
break;
case def_random:
sym->def[S_DEF_USER].tri = no;
cnt = rand() % 100;
if (sym->type == S_TRISTATE) {
if (cnt < pty)
sym->def[S_DEF_USER].tri = yes;
else if (cnt < (pty+ptm))
sym->def[S_DEF_USER].tri = mod;
} else if (cnt < pby)
sym->def[S_DEF_USER].tri = yes;
break;
default:
continue;
}
if (!(sym_is_choice(sym) && mode == def_random))
sym->flags |= SYMBOL_DEF_USER;
break;
default:
break;
}
}
sym_clear_all_valid();
/*
* We have different type of choice blocks.
* If curr.tri equals to mod then we can select several
* choice symbols in one block.
* In this case we do nothing.
* If curr.tri equals yes then only one symbol can be
* selected in a choice block and we set it to yes,
* and the rest to no.
*/
if (mode != def_random) {
for_all_symbols(i, csym) {
if ((sym_is_choice(csym) && !sym_has_value(csym)) ||
sym_is_choice_value(csym))
csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES;
}
}
for_all_symbols(i, csym) {
if (sym_has_value(csym) || !sym_is_choice(csym))
continue;
sym_calc_value(csym);
if (mode == def_random)
has_changed = randomize_choice_values(csym);
else {
set_all_choice_values(csym);
has_changed = true;
}
}
return has_changed;
}
================================================
FILE: kconfig/expr.c
================================================
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lkc.h"
#define DEBUG_EXPR 0
struct expr *expr_alloc_symbol(struct symbol *sym)
{
struct expr *e = xcalloc(1, sizeof(*e));
e->type = E_SYMBOL;
e->left.sym = sym;
return e;
}
struct expr *expr_alloc_one(enum expr_type type, struct expr *ce)
{
struct expr *e = xcalloc(1, sizeof(*e));
e->type = type;
e->left.expr = ce;
return e;
}
struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2)
{
struct expr *e = xcalloc(1, sizeof(*e));
e->type = type;
e->left.expr = e1;
e->right.expr = e2;
return e;
}
struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2)
{
struct expr *e = xcalloc(1, sizeof(*e));
e->type = type;
e->left.sym = s1;
e->right.sym = s2;
return e;
}
struct expr *expr_alloc_and(struct expr *e1, struct expr *e2)
{
if (!e1)
return e2;
return e2 ? expr_alloc_two(E_AND, e1, e2) : e1;
}
struct expr *expr_alloc_or(struct expr *e1, struct expr *e2)
{
if (!e1)
return e2;
return e2 ? expr_alloc_two(E_OR, e1, e2) : e1;
}
struct expr *expr_copy(const struct expr *org)
{
struct expr *e;
if (!org)
return NULL;
e = xmalloc(sizeof(*org));
memcpy(e, org, sizeof(*org));
switch (org->type) {
case E_SYMBOL:
e->left = org->left;
break;
case E_NOT:
e->left.expr = expr_copy(org->left.expr);
break;
case E_EQUAL:
case E_UNEQUAL:
e->left.sym = org->left.sym;
e->right.sym = org->right.sym;
break;
case E_AND:
case E_OR:
case E_LIST:
e->left.expr = expr_copy(org->left.expr);
e->right.expr = expr_copy(org->right.expr);
break;
default:
printf("can't copy type %d\n", e->type);
free(e);
e = NULL;
break;
}
return e;
}
void expr_free(struct expr *e)
{
if (!e)
return;
switch (e->type) {
case E_SYMBOL:
break;
case E_NOT:
expr_free(e->left.expr);
return;
case E_EQUAL:
case E_UNEQUAL:
break;
case E_OR:
case E_AND:
expr_free(e->left.expr);
expr_free(e->right.expr);
break;
default:
printf("how to free type %d?\n", e->type);
break;
}
free(e);
}
static int trans_count;
#define e1 (*ep1)
#define e2 (*ep2)
static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2)
{
if (e1->type == type) {
__expr_eliminate_eq(type, &e1->left.expr, &e2);
__expr_eliminate_eq(type, &e1->right.expr, &e2);
return;
}
if (e2->type == type) {
__expr_eliminate_eq(type, &e1, &e2->left.expr);
__expr_eliminate_eq(type, &e1, &e2->right.expr);
return;
}
if (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
e1->left.sym == e2->left.sym &&
(e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no))
return;
if (!expr_eq(e1, e2))
return;
trans_count++;
expr_free(e1); expr_free(e2);
switch (type) {
case E_OR:
e1 = expr_alloc_symbol(&symbol_no);
e2 = expr_alloc_symbol(&symbol_no);
break;
case E_AND:
e1 = expr_alloc_symbol(&symbol_yes);
e2 = expr_alloc_symbol(&symbol_yes);
break;
default:
;
}
}
void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
{
if (!e1 || !e2)
return;
switch (e1->type) {
case E_OR:
case E_AND:
__expr_eliminate_eq(e1->type, ep1, ep2);
default:
;
}
if (e1->type != e2->type) switch (e2->type) {
case E_OR:
case E_AND:
__expr_eliminate_eq(e2->type, ep1, ep2);
default:
;
}
e1 = expr_eliminate_yn(e1);
e2 = expr_eliminate_yn(e2);
}
#undef e1
#undef e2
int expr_eq(struct expr *e1, struct expr *e2)
{
int res, old_count;
if (e1->type != e2->type)
return 0;
switch (e1->type) {
case E_EQUAL:
case E_UNEQUAL:
return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym;
case E_SYMBOL:
return e1->left.sym == e2->left.sym;
case E_NOT:
return expr_eq(e1->left.expr, e2->left.expr);
case E_AND:
case E_OR:
e1 = expr_copy(e1);
e2 = expr_copy(e2);
old_count = trans_count;
expr_eliminate_eq(&e1, &e2);
res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL &&
e1->left.sym == e2->left.sym);
expr_free(e1);
expr_free(e2);
trans_count = old_count;
return res;
case E_LIST:
case E_RANGE:
case E_NONE:
/* panic */;
}
if (DEBUG_EXPR) {
expr_fprint(e1, stdout);
printf(" = ");
expr_fprint(e2, stdout);
printf(" ?\n");
}
return 0;
}
struct expr *expr_eliminate_yn(struct expr *e)
{
struct expr *tmp;
if (e) switch (e->type) {
case E_AND:
e->left.expr = expr_eliminate_yn(e->left.expr);
e->right.expr = expr_eliminate_yn(e->right.expr);
if (e->left.expr->type == E_SYMBOL) {
if (e->left.expr->left.sym == &symbol_no) {
expr_free(e->left.expr);
expr_free(e->right.expr);
e->type = E_SYMBOL;
e->left.sym = &symbol_no;
e->right.expr = NULL;
return e;
} else if (e->left.expr->left.sym == &symbol_yes) {
free(e->left.expr);
tmp = e->right.expr;
*e = *(e->right.expr);
free(tmp);
return e;
}
}
if (e->right.expr->type == E_SYMBOL) {
if (e->right.expr->left.sym == &symbol_no) {
expr_free(e->left.expr);
expr_free(e->right.expr);
e->type = E_SYMBOL;
e->left.sym = &symbol_no;
e->right.expr = NULL;
return e;
} else if (e->right.expr->left.sym == &symbol_yes) {
free(e->right.expr);
tmp = e->left.expr;
*e = *(e->left.expr);
free(tmp);
return e;
}
}
break;
case E_OR:
e->left.expr = expr_eliminate_yn(e->left.expr);
e->right.expr = expr_eliminate_yn(e->right.expr);
if (e->left.expr->type == E_SYMBOL) {
if (e->left.expr->left.sym == &symbol_no) {
free(e->left.expr);
tmp = e->right.expr;
*e = *(e->right.expr);
free(tmp);
return e;
} else if (e->left.expr->left.sym == &symbol_yes) {
expr_free(e->left.expr);
expr_free(e->right.expr);
e->type = E_SYMBOL;
e->left.sym = &symbol_yes;
e->right.expr = NULL;
return e;
}
}
if (e->right.expr->type == E_SYMBOL) {
if (e->right.expr->left.sym == &symbol_no) {
free(e->right.expr);
tmp = e->left.expr;
*e = *(e->left.expr);
free(tmp);
return e;
} else if (e->right.expr->left.sym == &symbol_yes) {
expr_free(e->left.expr);
expr_free(e->right.expr);
e->type = E_SYMBOL;
e->left.sym = &symbol_yes;
e->right.expr = NULL;
return e;
}
}
break;
default:
;
}
return e;
}
/*
* bool FOO!=n => FOO
*/
struct expr *expr_trans_bool(struct expr *e)
{
if (!e)
return NULL;
switch (e->type) {
case E_AND:
case E_OR:
case E_NOT:
e->left.expr = expr_trans_bool(e->left.expr);
e->right.expr = expr_trans_bool(e->right.expr);
break;
case E_UNEQUAL:
// FOO!=n -> FOO
if (e->left.sym->type == S_TRISTATE) {
if (e->right.sym == &symbol_no) {
e->type = E_SYMBOL;
e->right.sym = NULL;
}
}
break;
default:
;
}
return e;
}
/*
* e1 || e2 -> ?
*/
static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
{
struct expr *tmp;
struct symbol *sym1, *sym2;
if (expr_eq(e1, e2))
return expr_copy(e1);
if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
return NULL;
if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
return NULL;
if (e1->type == E_NOT) {
tmp = e1->left.expr;
if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
return NULL;
sym1 = tmp->left.sym;
} else
sym1 = e1->left.sym;
if (e2->type == E_NOT) {
if (e2->left.expr->type != E_SYMBOL)
return NULL;
sym2 = e2->left.expr->left.sym;
} else
sym2 = e2->left.sym;
if (sym1 != sym2)
return NULL;
if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
return NULL;
if (sym1->type == S_TRISTATE) {
if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
(e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) {
// (a='y') || (a='m') -> (a!='n')
return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no);
}
if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
(e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) {
// (a='y') || (a='n') -> (a!='m')
return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod);
}
if (e1->type == E_EQUAL && e2->type == E_EQUAL &&
((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
(e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) {
// (a='m') || (a='n') -> (a!='y')
return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
}
}
if (sym1->type == S_BOOLEAN && sym1 == sym2) {
if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
(e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
return expr_alloc_symbol(&symbol_yes);
}
if (DEBUG_EXPR) {
printf("optimize (");
expr_fprint(e1, stdout);
printf(") || (");
expr_fprint(e2, stdout);
printf(")?\n");
}
return NULL;
}
static struct expr *expr_join_and(struct expr *e1, struct expr *e2)
{
struct expr *tmp;
struct symbol *sym1, *sym2;
if (expr_eq(e1, e2))
return expr_copy(e1);
if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT)
return NULL;
if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT)
return NULL;
if (e1->type == E_NOT) {
tmp = e1->left.expr;
if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL)
return NULL;
sym1 = tmp->left.sym;
} else
sym1 = e1->left.sym;
if (e2->type == E_NOT) {
if (e2->left.expr->type != E_SYMBOL)
return NULL;
sym2 = e2->left.expr->left.sym;
} else
sym2 = e2->left.sym;
if (sym1 != sym2)
return NULL;
if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE)
return NULL;
if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) ||
(e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes))
// (a) && (a='y') -> (a='y')
return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) ||
(e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no))
// (a) && (a!='n') -> (a)
return expr_alloc_symbol(sym1);
if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) ||
(e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod))
// (a) && (a!='m') -> (a='y')
return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
if (sym1->type == S_TRISTATE) {
if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) {
// (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
sym2 = e1->right.sym;
if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
: expr_alloc_symbol(&symbol_no);
}
if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) {
// (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b'
sym2 = e2->right.sym;
if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST))
return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2)
: expr_alloc_symbol(&symbol_no);
}
if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) ||
(e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes)))
// (a!='y') && (a!='n') -> (a='m')
return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod);
if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) ||
(e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes)))
// (a!='y') && (a!='m') -> (a='n')
return expr_alloc_comp(E_EQUAL, sym1, &symbol_no);
if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL &&
((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) ||
(e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod)))
// (a!='m') && (a!='n') -> (a='m')
return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes);
if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) ||
(e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) ||
(e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) ||
(e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes))
return NULL;
}
if (DEBUG_EXPR) {
printf("optimize (");
expr_fprint(e1, stdout);
printf(") && (");
expr_fprint(e2, stdout);
printf(")?\n");
}
return NULL;
}
static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2)
{
#define e1 (*ep1)
#define e2 (*ep2)
struct expr *tmp;
if (e1->type == type) {
expr_eliminate_dups1(type, &e1->left.expr, &e2);
expr_eliminate_dups1(type, &e1->right.expr, &e2);
return;
}
if (e2->type == type) {
expr_eliminate_dups1(type, &e1, &e2->left.expr);
expr_eliminate_dups1(type, &e1, &e2->right.expr);
return;
}
if (e1 == e2)
return;
switch (e1->type) {
case E_OR: case E_AND:
expr_eliminate_dups1(e1->type, &e1, &e1);
default:
;
}
switch (type) {
case E_OR:
tmp = expr_join_or(e1, e2);
if (tmp) {
expr_free(e1); expr_free(e2);
e1 = expr_alloc_symbol(&symbol_no);
e2 = tmp;
trans_count++;
}
break;
case E_AND:
tmp = expr_join_and(e1, e2);
if (tmp) {
expr_free(e1); expr_free(e2);
e1 = expr_alloc_symbol(&symbol_yes);
e2 = tmp;
trans_count++;
}
break;
default:
;
}
#undef e1
#undef e2
}
static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2)
{
#define e1 (*ep1)
#define e2 (*ep2)
struct expr *tmp, *tmp1, *tmp2;
if (e1->type == type) {
expr_eliminate_dups2(type, &e1->left.expr, &e2);
expr_eliminate_dups2(type, &e1->right.expr, &e2);
return;
}
if (e2->type == type) {
expr_eliminate_dups2(type, &e1, &e2->left.expr);
expr_eliminate_dups2(type, &e1, &e2->right.expr);
}
if (e1 == e2)
return;
switch (e1->type) {
case E_OR:
expr_eliminate_dups2(e1->type, &e1, &e1);
// (FOO || BAR) && (!FOO && !BAR) -> n
tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
tmp2 = expr_copy(e2);
tmp = expr_extract_eq_and(&tmp1, &tmp2);
if (expr_is_yes(tmp1)) {
expr_free(e1);
e1 = expr_alloc_symbol(&symbol_no);
trans_count++;
}
expr_free(tmp2);
expr_free(tmp1);
expr_free(tmp);
break;
case E_AND:
expr_eliminate_dups2(e1->type, &e1, &e1);
// (FOO && BAR) || (!FOO || !BAR) -> y
tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1)));
tmp2 = expr_copy(e2);
tmp = expr_extract_eq_or(&tmp1, &tmp2);
if (expr_is_no(tmp1)) {
expr_free(e1);
e1 = expr_alloc_symbol(&symbol_yes);
trans_count++;
}
expr_free(tmp2);
expr_free(tmp1);
expr_free(tmp);
break;
default:
;
}
#undef e1
#undef e2
}
struct expr *expr_eliminate_dups(struct expr *e)
{
int oldcount;
if (!e)
return e;
oldcount = trans_count;
while (1) {
trans_count = 0;
switch (e->type) {
case E_OR: case E_AND:
expr_eliminate_dups1(e->type, &e, &e);
expr_eliminate_dups2(e->type, &e, &e);
default:
;
}
if (!trans_count)
break;
e = expr_eliminate_yn(e);
}
trans_count = oldcount;
return e;
}
struct expr *expr_transform(struct expr *e)
{
struct expr *tmp;
if (!e)
return NULL;
switch (e->type) {
case E_EQUAL:
case E_UNEQUAL:
case E_SYMBOL:
case E_LIST:
break;
default:
e->left.expr = expr_transform(e->left.expr);
e->right.expr = expr_transform(e->right.expr);
}
switch (e->type) {
case E_EQUAL:
if (e->left.sym->type != S_BOOLEAN)
break;
if (e->right.sym == &symbol_no) {
e->type = E_NOT;
e->left.expr = expr_alloc_symbol(e->left.sym);
e->right.sym = NULL;
break;
}
if (e->right.sym == &symbol_mod) {
printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name);
e->type = E_SYMBOL;
e->left.sym = &symbol_no;
e->right.sym = NULL;
break;
}
if (e->right.sym == &symbol_yes) {
e->type = E_SYMBOL;
e->right.sym = NULL;
break;
}
break;
case E_UNEQUAL:
if (e->left.sym->type != S_BOOLEAN)
break;
if (e->right.sym == &symbol_no) {
e->type = E_SYMBOL;
e->right.sym = NULL;
break;
}
if (e->right.sym == &symbol_mod) {
printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name);
e->type = E_SYMBOL;
e->left.sym = &symbol_yes;
e->right.sym = NULL;
break;
}
if (e->right.sym == &symbol_yes) {
e->type = E_NOT;
e->left.expr = expr_alloc_symbol(e->left.sym);
e->right.sym = NULL;
break;
}
break;
case E_NOT:
switch (e->left.expr->type) {
case E_NOT:
// !!a -> a
tmp = e->left.expr->left.expr;
free(e->left.expr);
free(e);
e = tmp;
e = expr_transform(e);
break;
case E_EQUAL:
case E_UNEQUAL:
// !a='x' -> a!='x'
tmp = e->left.expr;
free(e);
e = tmp;
e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL;
break;
case E_OR:
// !(a || b) -> !a && !b
tmp = e->left.expr;
e->type = E_AND;
e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
tmp->type = E_NOT;
tmp->right.expr = NULL;
e = expr_transform(e);
break;
case E_AND:
// !(a && b) -> !a || !b
tmp = e->left.expr;
e->type = E_OR;
e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr);
tmp->type = E_NOT;
tmp->right.expr = NULL;
e = expr_transform(e);
break;
case E_SYMBOL:
if (e->left.expr->left.sym == &symbol_yes) {
// !'y' -> 'n'
tmp = e->left.expr;
free(e);
e = tmp;
e->type = E_SYMBOL;
e->left.sym = &symbol_no;
break;
}
if (e->left.expr->left.sym == &symbol_mod) {
// !'m' -> 'm'
tmp = e->left.expr;
free(e);
e = tmp;
e->type = E_SYMBOL;
e->left.sym = &symbol_mod;
break;
}
if (e->left.expr->left.sym == &symbol_no) {
// !'n' -> 'y'
tmp = e->left.expr;
free(e);
e = tmp;
e->type = E_SYMBOL;
e->left.sym = &symbol_yes;
break;
}
break;
default:
;
}
break;
default:
;
}
return e;
}
int expr_contains_symbol(struct expr *dep, struct symbol *sym)
{
if (!dep)
return 0;
switch (dep->type) {
case E_AND:
case E_OR:
return expr_contains_symbol(dep->left.expr, sym) ||
expr_contains_symbol(dep->right.expr, sym);
case E_SYMBOL:
return dep->left.sym == sym;
case E_EQUAL:
case E_UNEQUAL:
return dep->left.sym == sym ||
dep->right.sym == sym;
case E_NOT:
return expr_contains_symbol(dep->left.expr, sym);
default:
;
}
return 0;
}
bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
{
if (!dep)
return false;
switch (dep->type) {
case E_AND:
return expr_depends_symbol(dep->left.expr, sym) ||
expr_depends_symbol(dep->right.expr, sym);
case E_SYMBOL:
return dep->left.sym == sym;
case E_EQUAL:
if (dep->left.sym == sym) {
if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod)
return true;
}
break;
case E_UNEQUAL:
if (dep->left.sym == sym) {
if (dep->right.sym == &symbol_no)
return true;
}
break;
default:
;
}
return false;
}
struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2)
{
struct expr *tmp = NULL;
expr_extract_eq(E_AND, &tmp, ep1, ep2);
if (tmp) {
*ep1 = expr_eliminate_yn(*ep1);
*ep2 = expr_eliminate_yn(*ep2);
}
return tmp;
}
struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2)
{
struct expr *tmp = NULL;
expr_extract_eq(E_OR, &tmp, ep1, ep2);
if (tmp) {
*ep1 = expr_eliminate_yn(*ep1);
*ep2 = expr_eliminate_yn(*ep2);
}
return tmp;
}
void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2)
{
#define e1 (*ep1)
#define e2 (*ep2)
if (e1->type == type) {
expr_extract_eq(type, ep, &e1->left.expr, &e2);
expr_extract_eq(type, ep, &e1->right.expr, &e2);
return;
}
if (e2->type == type) {
expr_extract_eq(type, ep, ep1, &e2->left.expr);
expr_extract_eq(type, ep, ep1, &e2->right.expr);
return;
}
if (expr_eq(e1, e2)) {
*ep = *ep ? expr_alloc_two(type, *ep, e1) : e1;
expr_free(e2);
if (type == E_AND) {
e1 = expr_alloc_symbol(&symbol_yes);
e2 = expr_alloc_symbol(&symbol_yes);
} else if (type == E_OR) {
e1 = expr_alloc_symbol(&symbol_no);
e2 = expr_alloc_symbol(&symbol_no);
}
}
#undef e1
#undef e2
}
struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym)
{
struct expr *e1, *e2;
if (!e) {
e = expr_alloc_symbol(sym);
if (type == E_UNEQUAL)
e = expr_alloc_one(E_NOT, e);
return e;
}
switch (e->type) {
case E_AND:
e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
if (sym == &symbol_yes)
e = expr_alloc_two(E_AND, e1, e2);
if (sym == &symbol_no)
e = expr_alloc_two(E_OR, e1, e2);
if (type == E_UNEQUAL)
e = expr_alloc_one(E_NOT, e);
return e;
case E_OR:
e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym);
e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym);
if (sym == &symbol_yes)
e = expr_alloc_two(E_OR, e1, e2);
if (sym == &symbol_no)
e = expr_alloc_two(E_AND, e1, e2);
if (type == E_UNEQUAL)
e = expr_alloc_one(E_NOT, e);
return e;
case E_NOT:
return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym);
case E_UNEQUAL:
case E_EQUAL:
if (type == E_EQUAL) {
if (sym == &symbol_yes)
return expr_copy(e);
if (sym == &symbol_mod)
return expr_alloc_symbol(&symbol_no);
if (sym == &symbol_no)
return expr_alloc_one(E_NOT, expr_copy(e));
} else {
if (sym == &symbol_yes)
return expr_alloc_one(E_NOT, expr_copy(e));
if (sym == &symbol_mod)
return expr_alloc_symbol(&symbol_yes);
if (sym == &symbol_no)
return expr_copy(e);
}
break;
case E_SYMBOL:
return expr_alloc_comp(type, e->left.sym, sym);
case E_LIST:
case E_RANGE:
case E_NONE:
/* panic */;
}
return NULL;
}
tristate expr_calc_value(struct expr *e)
{
tristate val1, val2;
const char *str1, *str2;
if (!e)
return yes;
switch (e->type) {
case E_SYMBOL:
sym_calc_value(e->left.sym);
return e->left.sym->curr.tri;
case E_AND:
val1 = expr_calc_value(e->left.expr);
val2 = expr_calc_value(e->right.expr);
return EXPR_AND(val1, val2);
case E_OR:
val1 = expr_calc_value(e->left.expr);
val2 = expr_calc_value(e->right.expr);
return EXPR_OR(val1, val2);
case E_NOT:
val1 = expr_calc_value(e->left.expr);
return EXPR_NOT(val1);
case E_EQUAL:
sym_calc_value(e->left.sym);
sym_calc_value(e->right.sym);
str1 = sym_get_string_value(e->left.sym);
str2 = sym_get_string_value(e->right.sym);
return !strcmp(str1, str2) ? yes : no;
case E_UNEQUAL:
sym_calc_value(e->left.sym);
sym_calc_value(e->right.sym);
str1 = sym_get_string_value(e->left.sym);
str2 = sym_get_string_value(e->right.sym);
return !strcmp(str1, str2) ? no : yes;
default:
printf("expr_calc_value: %d?\n", e->type);
return no;
}
}
int expr_compare_type(enum expr_type t1, enum expr_type t2)
{
#if 0
return 1;
#else
if (t1 == t2)
return 0;
switch (t1) {
case E_EQUAL:
case E_UNEQUAL:
if (t2 == E_NOT)
return 1;
case E_NOT:
if (t2 == E_AND)
return 1;
case E_AND:
if (t2 == E_OR)
return 1;
case E_OR:
if (t2 == E_LIST)
return 1;
case E_LIST:
if (t2 == 0)
return 1;
default:
return -1;
}
printf("[%dgt%d?]", t1, t2);
return 0;
#endif
}
static inline struct expr *
expr_get_leftmost_symbol(const struct expr *e)
{
if (e == NULL)
return NULL;
while (e->type != E_SYMBOL)
e = e->left.expr;
return expr_copy(e);
}
/*
* Given expression `e1' and `e2', returns the leaf of the longest
* sub-expression of `e1' not containing 'e2.
*/
struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2)
{
struct expr *ret;
switch (e1->type) {
case E_OR:
return expr_alloc_and(
expr_simplify_unmet_dep(e1->left.expr, e2),
expr_simplify_unmet_dep(e1->right.expr, e2));
case E_AND: {
struct expr *e;
e = expr_alloc_and(expr_copy(e1), expr_copy(e2));
e = expr_eliminate_dups(e);
ret = (!expr_eq(e, e1)) ? e1 : NULL;
expr_free(e);
break;
}
default:
ret = e1;
break;
}
return expr_get_leftmost_symbol(ret);
}
void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)
{
if (!e) {
fn(data, NULL, "y");
return;
}
if (expr_compare_type(prevtoken, e->type) > 0)
fn(data, NULL, "(");
switch (e->type) {
case E_SYMBOL:
if (e->left.sym->name)
fn(data, e->left.sym, e->left.sym->name);
else
fn(data, NULL, "<choice>");
break;
case E_NOT:
fn(data, NULL, "!");
expr_print(e->left.expr, fn, data, E_NOT);
break;
case E_EQUAL:
if (e->left.sym->name)
fn(data, e->left.sym, e->left.sym->name);
else
fn(data, NULL, "<choice>");
fn(data, NULL, "=");
fn(data, e->right.sym, e->right.sym->name);
break;
case E_UNEQUAL:
if (e->left.sym->name)
fn(data, e->left.sym, e->left.sym->name);
else
fn(data, NULL, "<choice>");
fn(data, NULL, "!=");
fn(data, e->right.sym, e->right.sym->name);
break;
case E_OR:
expr_print(e->left.expr, fn, data, E_OR);
fn(data, NULL, " || ");
expr_print(e->right.expr, fn, data, E_OR);
break;
case E_AND:
expr_print(e->left.expr, fn, data, E_AND);
fn(data, NULL, " && ");
expr_print(e->right.expr, fn, data, E_AND);
break;
case E_LIST:
fn(data, e->right.sym, e->right.sym->name);
if (e->left.expr) {
fn(data, NULL, " ^ ");
expr_print(e->left.expr, fn, data, E_LIST);
}
break;
case E_RANGE:
fn(data, NULL, "[");
fn(data, e->left.sym, e->left.sym->name);
fn(data, NULL, " ");
fn(data, e->right.sym, e->right.sym->name);
fn(data, NULL, "]");
break;
default:
{
char buf[32];
sprintf(buf, "<unknown type %d>", e->type);
fn(data, NULL, buf);
break;
}
}
if (expr_compare_type(prevtoken, e->type) > 0)
fn(data, NULL, ")");
}
static void expr_print_file_helper(void *data, struct symbol *sym, const char *str)
{
xfwrite(str, strlen(str), 1, data);
}
void expr_fprint(struct expr *e, FILE *out)
{
expr_print(e, expr_print_file_helper, out, E_NONE);
}
static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str)
{
struct gstr *gs = (struct gstr*)data;
const char *sym_str = NULL;
if (sym)
sym_str = sym_get_string_value(sym);
if (gs->max_width) {
unsigned extra_length = strlen(str);
const char *last_cr = strrchr(gs->s, '\n');
unsigned last_line_length;
if (sym_str)
extra_length += 4 + strlen(sym_str);
if (!last_cr)
last_cr = gs->s;
last_line_length = strlen(gs->s) - (last_cr - gs->s);
if ((last_line_length + extra_length) > gs->max_width)
str_append(gs, "\\\n");
}
str_append(gs, str);
if (sym && sym->type != S_UNKNOWN)
str_printf(gs, " [=%s]", sym_str);
}
void expr_gstr_print(struct expr *e, struct gstr *gs)
{
expr_print(e, expr_print_gstr_helper, gs, E_NONE);
}
================================================
FILE: kconfig/expr.h
================================================
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
* Released under the terms of the GNU GPL v2.0.
*/
#ifndef EXPR_H
#define EXPR_H
#ifdef __cplusplus
extern "C" {
#endif
#include <assert.h>
#include <stdio.h>
#include "list.h"
#ifndef __cplusplus
#include <stdbool.h>
#endif
struct file {
struct file *next;
struct file *parent;
const char *name;
int lineno;
};
typedef enum tristate {
no, mod, yes
} tristate;
enum expr_type {
E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE
};
union expr_data {
struct expr *expr;
struct symbol *sym;
};
struct expr {
enum expr_type type;
union expr_data left, right;
};
#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2))
#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2))
#define EXPR_NOT(dep) (2-(dep))
#define expr_list_for_each_sym(l, e, s) \
for (e = (l); e && (s = e->right.sym); e = e->left.expr)
struct expr_value {
struct expr *expr;
tristate tri;
};
struct symbol_value {
void *val;
tristate tri;
};
enum symbol_type {
S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER
};
/* enum values are used as index to symbol.def[] */
enum {
S_DEF_USER, /* main user value */
S_DEF_AUTO, /* values read from auto.conf */
S_DEF_DEF3, /* Reserved for UI usage */
S_DEF_DEF4, /* Reserved for UI usage */
S_DEF_COUNT
};
struct symbol {
struct symbol *next;
char *name;
enum symbol_type type;
struct symbol_value curr;
struct symbol_value def[S_DEF_COUNT];
tristate visible;
int flags;
struct property *prop;
struct expr_value dir_dep;
struct expr_value rev_dep;
};
#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER)
#define SYMBOL_CONST 0x0001 /* symbol is const */
#define SYMBOL_CHECK 0x0008 /* used during dependency checking */
#define SYMBOL_CHOICE 0x0010 /* start of a choice block (null name) */
#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */
#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
#define SYMBOL_CHANGED 0x0400 /* ? */
#define SYMBOL_AUTO 0x1000 /* value from environment variable */
#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
#define SYMBOL_WARNED 0x8000 /* warning has been issued */
/* Set when symbol.def[] is used */
#define SYMBOL_DEF 0x10000 /* First bit of SYMBOL_DEF */
#define SYMBOL_DEF_USER 0x10000 /* symbol.def[S_DEF_USER] is valid */
#define SYMBOL_DEF_AUTO 0x20000 /* symbol.def[S_DEF_AUTO] is valid */
#define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */
#define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */
/* choice values need to be set before calculating this symbol value */
#define SYMBOL_NEED_SET_CHOICE_VALUES 0x100000
/* Set symbol to y if allnoconfig; used for symbols that hide others */
#define SYMBOL_ALLNOCONFIG_Y 0x200000
#define SYMBOL_MAXLENGTH 256
#define SYMBOL_HASHSIZE 9973
/* A property represent the config options that can be associated
* with a config "symbol".
* Sample:
* config FOO
* default y
* prompt "foo prompt"
* select BAR
* config BAZ
* int "BAZ Value"
* range 1..255
*/
enum prop_type {
P_UNKNOWN,
P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */
P_COMMENT, /* text associated with a comment */
P_MENU, /* prompt associated with a menuconfig option */
P_DEFAULT, /* default y */
P_CHOICE, /* choice value */
P_SELECT, /* select BAR */
P_RANGE, /* range 7..100 (for a symbol) */
P_ENV, /* value from environment variable */
P_SYMBOL, /* where a symbol is defined */
};
struct property {
struct property *next; /* next property - null if last */
struct symbol *sym; /* the symbol for which the property is associated */
enum prop_type type; /* type of property */
const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */
struct expr_value visible;
struct expr *expr; /* the optional conditional part of the property */
struct menu *menu; /* the menu the property are associated with
* valid for: P_SELECT, P_RANGE, P_CHOICE,
* P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */
struct file *file; /* what file was this property defined */
int lineno; /* what lineno was this property defined */
};
#define for_all_properties(sym, st, tok) \
for (st = sym->prop; st; st = st->next) \
if (st->type == (tok))
#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT)
#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE)
#define for_all_prompts(sym, st) \
for (st = sym->prop; st; st = st->next) \
if (st->text)
struct menu {
struct menu *next;
struct menu *parent;
struct menu *list;
struct symbol *sym;
struct property *prompt;
struct expr *visibility;
struct expr *dep;
unsigned int flags;
char *help;
struct file *file;
int lineno;
void *data;
};
#define MENU_CHANGED 0x0001
#define MENU_ROOT 0x0002
struct jump_key {
struct list_head entries;
size_t offset;
struct menu *target;
int index;
};
#define JUMP_NB 9
extern struct file *file_list;
extern struct file *current_file;
struct file *lookup_file(const char *name);
extern struct symbol symbol_yes, symbol_no, symbol_mod;
extern struct symbol *modules_sym;
extern struct symbol *sym_defconfig_list;
extern int cdebug;
struct expr *expr_alloc_symbol(struct symbol *sym);
struct expr *expr_alloc_one(enum expr_type type, struct expr *ce);
struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2);
struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2);
struct expr *expr_alloc_and(struct expr *e1, struct expr *e2);
struct expr *expr_alloc_or(struct expr *e1, struct expr *e2);
struct expr *expr_copy(const struct expr *org);
void expr_free(struct expr *e);
int expr_eq(struct expr *e1, struct expr *e2);
void expr_eliminate_eq(struct expr **ep1, struct expr **ep2);
tristate expr_calc_value(struct expr *e);
struct expr *expr_eliminate_yn(struct expr *e);
struct expr *expr_trans_bool(struct expr *e);
struct expr *expr_eliminate_dups(struct expr *e);
struct expr *expr_transform(struct expr *e);
int expr_contains_symbol(struct expr *dep, struct symbol *sym);
bool expr_depends_symbol(struct expr *dep, struct symbol *sym);
struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2);
struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2);
void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2);
struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym);
struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);
void expr_fprint(struct expr *e, FILE *out);
struct gstr; /* forward */
void expr_gstr_print(struct expr *e, struct gstr *gs);
static inline int expr_is_yes(struct expr *e)
{
return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes);
}
static inline int expr_is_no(struct expr *e)
{
return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no);
}
#ifdef __cplusplus
}
#endif
#endif /* EXPR_H */
================================================
FILE: kconfig/frosted.conf
================================================
================================================
FILE: kconfig/gconf.c
================================================
/* Hey EMACS -*- linux-c -*- */
/*
*
* Copyright (C) 2002-2003 Romain Lievin <roms@tilp.info>
* Released under the terms of the GNU GPL v2.0.
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <stdlib.h>
#include "lkc.h"
#include "images.c"
#include <glade/glade.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <gdk/gdkkeysyms.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <time.h>
//#define DEBUG
enum {
SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW
};
enum {
OPT_NORMAL, OPT_ALL, OPT_PROMPT
};
static gint view_mode = FULL_VIEW;
static gboolean show_name = TRUE;
static gboolean show_range = TRUE;
static gboolean show_value = TRUE;
static gboolean resizeable = FALSE;
static int opt_mode = OPT_NORMAL;
GtkWidget *main_wnd = NULL;
GtkWidget *tree1_w = NULL; // left frame
GtkWidget *tree2_w = NULL; // right frame
GtkWidget *text_w = NULL;
GtkWidget *hpaned = NULL;
GtkWidget *vpaned = NULL;
GtkWidget *back_btn = NULL;
GtkWidget *save_btn = NULL;
GtkWidget *save_menu_item = NULL;
GtkTextTag *tag1, *tag2;
GdkColor color;
GtkTreeStore *tree1, *tree2, *tree;
GtkTreeModel *model1, *model2;
static GtkTreeIter *parents[256];
static gint indent;
static struct menu *current; // current node for SINGLE view
static struct menu *browsed; // browsed node for SPLIT view
enum {
COL_OPTION, COL_NAME, COL_NO, COL_MOD, COL_YES, COL_VALUE,
COL_MENU, COL_COLOR, COL_EDIT, COL_PIXBUF,
COL_PIXVIS, COL_BTNVIS, COL_BTNACT, COL_BTNINC, COL_BTNRAD,
COL_NUMBER
};
static void display_list(void);
static void display_tree(struct menu *menu);
static void display_tree_part(void);
static void update_tree(struct menu *src, GtkTreeIter * dst);
static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row);
static gchar **fill_row(struct menu *menu);
static void conf_changed(void);
/* Helping/Debugging Functions */
const char *dbg_sym_flags(int val)
{
static char buf[256];
bzero(buf, 256);
if (val & SYMBOL_CONST)
strcat(buf, "const/");
if (val & SYMBOL_CHECK)
strcat(buf, "check/");
if (val & SYMBOL_CHOICE)
strcat(buf, "choice/");
if (val & SYMBOL_CHOICEVAL)
strcat(buf, "choiceval/");
if (val & SYMBOL_VALID)
strcat(buf, "valid/");
if (val & SYMBOL_OPTIONAL)
strcat(buf, "optional/");
if (val & SYMBOL_WRITE)
strcat(buf, "write/");
if (val & SYMBOL_CHANGED)
strcat(buf, "changed/");
if (val & SYMBOL_AUTO)
strcat(buf, "auto/");
buf[strlen(buf) - 1] = '\0';
return buf;
}
void replace_button_icon(GladeXML * xml, GdkDrawable * window,
GtkStyle * style, gchar * btn_name, gchar ** xpm)
{
GdkPixmap *pixmap;
GdkBitmap *mask;
GtkToolButton *button;
GtkWidget *image;
pixmap = gdk_pixmap_create_from_xpm_d(window, &mask,
&style->bg[GTK_STATE_NORMAL],
xpm);
button = GTK_TOOL_BUTTON(glade_xml_get_widget(xml, btn_name));
image = gtk_image_new_from_pixmap(pixmap, mask);
gtk_widget_show(image);
gtk_tool_button_set_icon_widget(button, image);
}
/* Main Window Initialization */
void init_main_window(const gchar * glade_file)
{
GladeXML *xml;
GtkWidget *widget;
GtkTextBuffer *txtbuf;
GtkStyle *style;
xml = glade_xml_new(glade_file, "window1", NULL);
if (!xml)
g_error(_("GUI loading failed !\n"));
glade_xml_signal_autoconnect(xml);
main_wnd = glade_xml_get_widget(xml, "window1");
hpaned = glade_xml_get_widget(xml, "hpaned1");
vpaned = glade_xml_get_widget(xml, "vpaned1");
tree1_w = glade_xml_get_widget(xml, "treeview1");
tree2_w = glade_xml_get_widget(xml, "treeview2");
text_w = glade_xml_get_widget(xml, "textview3");
back_btn = glade_xml_get_widget(xml, "button1");
gtk_widget_set_sensitive(back_btn, FALSE);
widget = glade_xml_get_widget(xml, "show_name1");
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
show_name);
widget = glade_xml_get_widget(xml, "show_range1");
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
show_range);
widget = glade_xml_get_widget(xml, "show_data1");
gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget,
show_value);
save_btn = glade_xml_get_widget(xml, "button3");
save_menu_item = glade_xml_get_widget(xml, "save1");
conf_set_changed_callback(conf_changed);
style = gtk_widget_get_style(main_wnd);
widget = glade_xml_get_widget(xml, "toolbar1");
#if 0 /* Use stock Gtk icons instead */
replace_button_icon(xml, main_wnd->window, style,
"button1", (gchar **) xpm_back);
replace_button_icon(xml, main_wnd->window, style,
"button2", (gchar **) xpm_load);
replace_button_icon(xml, main_wnd->window, style,
"button3", (gchar **) xpm_save);
#endif
replace_button_icon(xml, main_wnd->window, style,
"button4", (gchar **) xpm_single_view);
replace_button_icon(xml, main_wnd->window, style,
"button5", (gchar **) xpm_split_view);
replace_button_icon(xml, main_wnd->window, style,
"button6", (gchar **) xpm_tree_view);
#if 0
switch (view_mode) {
case SINGLE_VIEW:
widget = glade_xml_get_widget(xml, "button4");
g_signal_emit_by_name(widget, "clicked");
break;
case SPLIT_VIEW:
widget = glade_xml_get_widget(xml, "button5");
g_signal_emit_by_name(widget, "clicked");
break;
case FULL_VIEW:
widget = glade_xml_get_widget(xml, "button6");
g_signal_emit_by_name(widget, "clicked");
break;
}
#endif
txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1",
"foreground", "red",
"weight", PANGO_WEIGHT_BOLD,
NULL);
tag2 = gtk_text_buffer_create_tag(txtbuf, "mytag2",
/*"style", PANGO_STYLE_OBLIQUE, */
NULL);
gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text);
gtk_widget_show(main_wnd);
}
void init_tree_model(void)
{
gint i;
tree = tree2 = gtk_tree_store_new(COL_NUMBER,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_POINTER, GDK_TYPE_COLOR,
G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN);
model2 = GTK_TREE_MODEL(tree2);
for (parents[0] = NULL, i = 1; i < 256; i++)
parents[i] = (GtkTreeIter *) g_malloc(sizeof(GtkTreeIter));
tree1 = gtk_tree_store_new(COL_NUMBER,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_STRING, G_TYPE_STRING,
G_TYPE_POINTER, GDK_TYPE_COLOR,
G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN);
model1 = GTK_TREE_MODEL(tree1);
}
void init_left_tree(void)
{
GtkTreeView *view = GTK_TREE_VIEW(tree1_w);
GtkCellRenderer *renderer;
GtkTreeSelection *sel;
GtkTreeViewColumn *column;
gtk_tree_view_set_model(view, model1);
gtk_tree_view_set_headers_visible(view, TRUE);
gtk_tree_view_set_rules_hint(view, TRUE);
column = gtk_tree_view_column_new();
gtk_tree_view_append_column(view, column);
gtk_tree_view_column_set_title(column, _("Options"));
renderer = gtk_cell_renderer_toggle_new();
gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
renderer, FALSE);
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"active", COL_BTNACT,
"inconsistent", COL_BTNINC,
"visible", COL_BTNVIS,
"radio", COL_BTNRAD, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
renderer, FALSE);
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"text", COL_OPTION,
"foreground-gdk",
COL_COLOR, NULL);
sel = gtk_tree_view_get_selection(view);
gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
gtk_widget_realize(tree1_w);
}
static void renderer_edited(GtkCellRendererText * cell,
const gchar * path_string,
const gchar * new_text, gpointer user_data);
void init_right_tree(void)
{
GtkTreeView *view = GTK_TREE_VIEW(tree2_w);
GtkCellRenderer *renderer;
GtkTreeSelection *sel;
GtkTreeViewColumn *column;
gint i;
gtk_tree_view_set_model(view, model2);
gtk_tree_view_set_headers_visible(view, TRUE);
gtk_tree_view_set_rules_hint(view, TRUE);
column = gtk_tree_view_column_new();
gtk_tree_view_append_column(view, column);
gtk_tree_view_column_set_title(column, _("Options"));
renderer = gtk_cell_renderer_pixbuf_new();
gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
renderer, FALSE);
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"pixbuf", COL_PIXBUF,
"visible", COL_PIXVIS, NULL);
renderer = gtk_cell_renderer_toggle_new();
gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
renderer, FALSE);
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"active", COL_BTNACT,
"inconsistent", COL_BTNINC,
"visible", COL_BTNVIS,
"radio", COL_BTNRAD, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
renderer, FALSE);
gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
renderer,
"text", COL_OPTION,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
_("Name"), renderer,
"text", COL_NAME,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"N", renderer,
"text", COL_NO,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"M", renderer,
"text", COL_MOD,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
"Y", renderer,
"text", COL_YES,
"foreground-gdk",
COL_COLOR, NULL);
renderer = gtk_cell_renderer_text_new();
gtk_tree_view_insert_column_with_attributes(view, -1,
_("Value"), renderer,
"text", COL_VALUE,
"editable",
COL_EDIT,
"foreground-gdk",
COL_COLOR, NULL);
g_signal_connect(G_OBJECT(renderer), "edited",
G_CALLBACK(renderer_edited), NULL);
column = gtk_tree_view_get_column(view, COL_NAME);
gtk_tree_view_column_set_visible(column, show_name);
column = gtk_tree_view_get_column(view, COL_NO);
gtk_tree_view_column_set_visible(column, show_range);
column = gtk_tree_view_get_column(view, COL_MOD);
gtk_tree_view_column_set_visible(column, show_range);
column = gtk_tree_view_get_column(view, COL_YES);
gtk_tree_view_column_set_visible(column, show_range);
column = gtk_tree_view_get_column(view, COL_VALUE);
gtk_tree_view_column_set_visible(column, show_value);
if (resizeable) {
for (i = 0; i < COL_VALUE; i++) {
column = gtk_tree_view_get_column(view, i);
gtk_tree_view_column_set_resizable(column, TRUE);
}
}
sel = gtk_tree_view_get_selection(view);
gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
}
/* Utility Functions */
static void text_insert_help(struct menu *menu)
{
GtkTextBuffer *buffer;
GtkTextIter start, end;
const char *prompt = _(menu_get_prompt(menu));
struct gstr help = str_new();
menu_get_ext_help(menu, &help);
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
gtk_text_buffer_get_bounds(buffer, &start, &end);
gtk_text_buffer_delete(buffer, &start, &end);
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15);
gtk_text_buffer_get_end_iter(buffer, &end);
gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
NULL);
gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
gtk_text_buffer_get_end_iter(buffer, &end);
gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
NULL);
str_free(&help);
}
static void text_insert_msg(const char *title, const char *message)
{
GtkTextBuffer *buffer;
GtkTextIter start, end;
const char *msg = message;
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
gtk_text_buffer_get_bounds(buffer, &start, &end);
gtk_text_buffer_delete(buffer, &start, &end);
gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15);
gtk_text_buffer_get_end_iter(buffer, &end);
gtk_text_buffer_insert_with_tags(buffer, &end, title, -1, tag1,
NULL);
gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
gtk_text_buffer_get_end_iter(buffer, &end);
gtk_text_buffer_insert_with_tags(buffer, &end, msg, -1, tag2,
NULL);
}
/* Main Windows Callbacks */
void on_save_activate(GtkMenuItem * menuitem, gpointer user_data);
gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
gpointer user_data)
{
GtkWidget *dialog, *label;
gint result;
if (!conf_get_changed())
return FALSE;
dialog = gtk_dialog_new_with_buttons(_("Warning !"),
GTK_WINDOW(main_wnd),
(GtkDialogFlags)
(GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT),
GTK_STOCK_OK,
GTK_RESPONSE_YES,
GTK_STOCK_NO,
GTK_RESPONSE_NO,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL, NULL);
gtk_dialog_set_default_response(GTK_DIALOG(dialog),
GTK_RESPONSE_CANCEL);
label = gtk_label_new(_("\nSave configuration ?\n"));
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label);
gtk_widget_show(label);
result = gtk_dialog_run(GTK_DIALOG(dialog));
switch (result) {
case GTK_RESPONSE_YES:
on_save_activate(NULL, NULL);
return FALSE;
case GTK_RESPONSE_NO:
return FALSE;
case GTK_RESPONSE_CANCEL:
case GTK_RESPONSE_DELETE_EVENT:
default:
gtk_widget_destroy(dialog);
return TRUE;
}
return FALSE;
}
void on_window1_destroy(GtkObject * object, gpointer user_data)
{
gtk_main_quit();
}
void
on_window1_size_request(GtkWidget * widget,
GtkRequisition * requisition, gpointer user_data)
{
static gint old_h;
gint w, h;
if (widget->window == NULL)
gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
else
gdk_window_get_size(widget->window, &w, &h);
if (h == old_h)
return;
old_h = h;
gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3);
}
/* Menu & Toolbar Callbacks */
static void
load_filename(GtkFileSelection * file_selector, gpointer user_data)
{
const gchar *fn;
fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION
(user_data));
if (conf_read(fn))
text_insert_msg(_("Error"), _("Unable to load configuration !"));
else
display_tree(&rootmenu);
}
void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *fs;
fs = gtk_file_selection_new(_("Load file..."));
g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
"clicked",
G_CALLBACK(load_filename), (gpointer) fs);
g_signal_connect_swapped(GTK_OBJECT
(GTK_FILE_SELECTION(fs)->ok_button),
"clicked", G_CALLBACK(gtk_widget_destroy),
(gpointer) fs);
g_signal_connect_swapped(GTK_OBJECT
(GTK_FILE_SELECTION(fs)->cancel_button),
"clicked", G_CALLBACK(gtk_widget_destroy),
(gpointer) fs);
gtk_widget_show(fs);
}
void on_save_activate(GtkMenuItem * menuitem, gpointer user_data)
{
if (conf_write(NULL))
text_insert_msg(_("Error"), _("Unable to save configuration !"));
}
static void
store_filename(GtkFileSelection * file_selector, gpointer user_data)
{
const gchar *fn;
fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION
(user_data));
if (conf_write(fn))
text_insert_msg(_("Error"), _("Unable to save configuration !"));
gtk_widget_destroy(GTK_WIDGET(user_data));
}
void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *fs;
fs = gtk_file_selection_new(_("Save file as..."));
g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button),
"clicked",
G_CALLBACK(store_filename), (gpointer) fs);
g_signal_connect_swapped(GTK_OBJECT
(GTK_FILE_SELECTION(fs)->ok_button),
"clicked", G_CALLBACK(gtk_widget_destroy),
(gpointer) fs);
g_signal_connect_swapped(GTK_OBJECT
(GTK_FILE_SELECTION(fs)->cancel_button),
"clicked", G_CALLBACK(gtk_widget_destroy),
(gpointer) fs);
gtk_widget_show(fs);
}
void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
if (!on_window1_delete_event(NULL, NULL, NULL))
gtk_widget_destroy(GTK_WIDGET(main_wnd));
}
void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkTreeViewColumn *col;
show_name = GTK_CHECK_MENU_ITEM(menuitem)->active;
col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NAME);
if (col)
gtk_tree_view_column_set_visible(col, show_name);
}
void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkTreeViewColumn *col;
show_range = GTK_CHECK_MENU_ITEM(menuitem)->active;
col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NO);
if (col)
gtk_tree_view_column_set_visible(col, show_range);
col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_MOD);
if (col)
gtk_tree_view_column_set_visible(col, show_range);
col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_YES);
if (col)
gtk_tree_view_column_set_visible(col, show_range);
}
void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkTreeViewColumn *col;
show_value = GTK_CHECK_MENU_ITEM(menuitem)->active;
col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_VALUE);
if (col)
gtk_tree_view_column_set_visible(col, show_value);
}
void
on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
opt_mode = OPT_NORMAL;
gtk_tree_store_clear(tree2);
display_tree(&rootmenu); /* instead of update_tree to speed-up */
}
void
on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data)
{
opt_mode = OPT_ALL;
gtk_tree_store_clear(tree2);
display_tree(&rootmenu); /* instead of update_tree to speed-up */
}
void
on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data)
{
opt_mode = OPT_PROMPT;
gtk_tree_store_clear(tree2);
display_tree(&rootmenu); /* instead of update_tree to speed-up */
}
void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
const gchar *intro_text = _(
"Welcome to gkc, the GTK+ graphical configuration tool\n"
"For each option, a blank box indicates the feature is disabled, a\n"
"check indicates it is enabled, and a dot indicates that it is to\n"
"be compiled as a module. Clicking on the box will cycle through the three states.\n"
"\n"
"If you do not see an option (e.g., a device driver) that you\n"
"believe should be present, try turning on Show All Options\n"
"under the Options menu.\n"
"Although there is no cross reference yet to help you figure out\n"
"what other options must be enabled to support the option you\n"
"are interested in, you can still view the help of a grayed-out\n"
"option.\n"
"\n"
"Toggling Show Debug Info under the Options menu will show \n"
"the dependencies, which you can then match by examining other options.");
dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE, "%s", intro_text);
g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
G_CALLBACK(gtk_widget_destroy),
GTK_OBJECT(dialog));
gtk_widget_show_all(dialog);
}
void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
const gchar *about_text =
_("gkc is copyright (c) 2002 Romain Lievin <roms@lpg.ticalc.org>.\n"
"Based on the source code from Roman Zippel.\n");
dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE, "%s", about_text);
g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
G_CALLBACK(gtk_widget_destroy),
GTK_OBJECT(dialog));
gtk_widget_show_all(dialog);
}
void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
{
GtkWidget *dialog;
const gchar *license_text =
_("gkc is released under the terms of the GNU GPL v2.\n"
"For more information, please see the source code or\n"
"visit http://www.fsf.org/licenses/licenses.html\n");
dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE, "%s", license_text);
g_signal_connect_swapped(GTK_OBJECT(dialog), "response",
G_CALLBACK(gtk_widget_destroy),
GTK_OBJECT(dialog));
gtk_widget_show_all(dialog);
}
void on_back_clicked(GtkButton * button, gpointer user_data)
{
enum prop_type ptype;
current = current->parent;
ptype = current->prompt ? current->prompt->type : P_UNKNOWN;
if (ptype != P_MENU)
current = current->parent;
display_tree_part();
if (current == &rootmenu)
gtk_widget_set_sensitive(back_btn, FALSE);
}
void on_load_clicked(GtkButton * button, gpointer user_data)
{
on_load1_activate(NULL, user_data);
}
void on_single_clicked(GtkButton * button, gpointer user_data)
{
view_mode = SINGLE_VIEW;
gtk_widget_hide(tree1_w);
current = &rootmenu;
display_tree_part();
}
void on_split_clicked(GtkButton * button, gpointer user_data)
{
gint w, h;
view_mode = SPLIT_VIEW;
gtk_widget_show(tree1_w);
gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
gtk_paned_set_position(GTK_PANED(hpaned), w / 2);
if (tree2)
gtk_tree_store_clear(tree2);
display_list();
/* Disable back btn, like in full mode. */
gtk_widget_set_sensitive(back_btn, FALSE);
}
void on_full_clicked(GtkButton * button, gpointer user_data)
{
view_mode = FULL_VIEW;
gtk_widget_hide(tree1_w);
if (tree2)
gtk_tree_store_clear(tree2);
display_tree(&rootmenu);
gtk_widget_set_sensitive(back_btn, FALSE);
}
void on_collapse_clicked(GtkButton * button, gpointer user_data)
{
gtk_tree_view_collapse_all(GTK_TREE_VIEW(tree2_w));
}
void on_expand_clicked(GtkButton * button, gpointer user_data)
{
gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w));
}
/* CTree Callbacks */
/* Change hex/int/string value in the cell */
static void renderer_edited(GtkCellRendererText * cell,
const gchar * path_string,
const gchar * new_text, gpointer user_data)
{
GtkTreePath *path = gtk_tree_path_new_from_string(path_string);
GtkTreeIter iter;
const char *old_def, *new_def;
struct menu *menu;
struct symbol *sym;
if (!gtk_tree_model_get_iter(model2, &iter, path))
return;
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
sym = menu->sym;
gtk_tree_model_get(model2, &iter, COL_VALUE, &old_def, -1);
new_def = new_text;
sym_set_string_value(sym, new_def);
update_tree(&rootmenu, NULL);
gtk_tree_path_free(path);
}
/* Change the value of a symbol and update the tree */
static void change_sym_value(struct menu *menu, gint col)
{
struct symbol *sym = menu->sym;
tristate newval;
if (!sym)
return;
if (col == COL_NO)
newval = no;
else if (col == COL_MOD)
newval = mod;
else if (col == COL_YES)
newval = yes;
else
return;
switch (sym_get_type(sym)) {
case S_BOOLEAN:
case S_TRISTATE:
if (!sym_tristate_within_range(sym, newval))
newval = yes;
sym_set_tristate_value(sym, newval);
if (view_mode == FULL_VIEW)
update_tree(&rootmenu, NULL);
else if (view_mode == SPLIT_VIEW) {
update_tree(browsed, NULL);
display_list();
}
else if (view_mode == SINGLE_VIEW)
display_tree_part(); //fixme: keep exp/coll
break;
case S_INT:
case S_HEX:
case S_STRING:
default:
break;
}
}
static void toggle_sym_value(struct menu *menu)
{
if (!menu->sym)
return;
sym_toggle_tristate_value(menu->sym);
if (view_mode == FULL_VIEW)
update_tree(&rootmenu, NULL);
else if (view_mode == SPLIT_VIEW) {
update_tree(browsed, NULL);
display_list();
}
else if (view_mode == SINGLE_VIEW)
display_tree_part(); //fixme: keep exp/coll
}
static gint column2index(GtkTreeViewColumn * column)
{
gint i;
for (i = 0; i < COL_NUMBER; i++) {
GtkTreeViewColumn *col;
col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), i);
if (col == column)
return i;
}
return -1;
}
/* User click: update choice (full) or goes down (single) */
gboolean
on_treeview2_button_press_event(GtkWidget * widget,
GdkEventButton * event, gpointer user_data)
{
GtkTreeView *view = GTK_TREE_VIEW(widget);
GtkTreePath *path;
GtkTreeViewColumn *column;
GtkTreeIter iter;
struct menu *menu;
gint col;
#if GTK_CHECK_VERSION(2,1,4) // bug in ctree with earlier version of GTK
gint tx = (gint) event->x;
gint ty = (gint) event->y;
gint cx, cy;
gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx,
&cy);
#else
gtk_tree_view_get_cursor(view, &path, &column);
#endif
if (path == NULL)
return FALSE;
if (!gtk_tree_model_get_iter(model2, &iter, path))
return FALSE;
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
col = column2index(column);
if (event->type == GDK_2BUTTON_PRESS) {
enum prop_type ptype;
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
if (ptype == P_MENU && view_mode != FULL_VIEW && col == COL_OPTION) {
// goes down into menu
current = menu;
display_tree_part();
gtk_widget_set_sensitive(back_btn, TRUE);
} else if ((col == COL_OPTION)) {
toggle_sym_value(menu);
gtk_tree_view_expand_row(view, path, TRUE);
}
} else {
if (col == COL_VALUE) {
toggle_sym_value(menu);
gtk_tree_view_expand_row(view, path, TRUE);
} else if (col == COL_NO || col == COL_MOD
|| col == COL_YES) {
change_sym_value(menu, col);
gtk_tree_view_expand_row(view, path, TRUE);
}
}
return FALSE;
}
/* Key pressed: update choice */
gboolean
on_treeview2_key_press_event(GtkWidget * widget,
GdkEventKey * event, gpointer user_data)
{
GtkTreeView *view = GTK_TREE_VIEW(widget);
GtkTreePath *path;
GtkTreeViewColumn *column;
GtkTreeIter iter;
struct menu *menu;
gint col;
gtk_tree_view_get_cursor(view, &path, &column);
if (path == NULL)
return FALSE;
if (event->keyval == GDK_space) {
if (gtk_tree_view_row_expanded(view, path))
gtk_tree_view_collapse_row(view, path);
else
gtk_tree_view_expand_row(view, path, FALSE);
return TRUE;
}
if (event->keyval == GDK_KP_Enter) {
}
if (widget == tree1_w)
return FALSE;
gtk_tree_model_get_iter(model2, &iter, path);
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
if (!strcasecmp(event->string, "n"))
col = COL_NO;
else if (!strcasecmp(event->string, "m"))
col = COL_MOD;
else if (!strcasecmp(event->string, "y"))
col = COL_YES;
else
col = -1;
change_sym_value(menu, col);
return FALSE;
}
/* Row selection changed: update help */
void
on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data)
{
GtkTreeSelection *selection;
GtkTreeIter iter;
struct menu *menu;
selection = gtk_tree_view_get_selection(treeview);
if (gtk_tree_selection_get_selected(selection, &model2, &iter)) {
gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1);
text_insert_help(menu);
}
}
/* User click: display sub-tree in the right frame. */
gboolean
on_treeview1_button_press_event(GtkWidget * widget,
GdkEventButton * event, gpointer user_data)
{
GtkTreeView *view = GTK_TREE_VIEW(widget);
GtkTreePath *path;
GtkTreeViewColumn *column;
GtkTreeIter iter;
struct menu *menu;
gint tx = (gint) event->x;
gint ty = (gint) event->y;
gint cx, cy;
gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx,
&cy);
if (path == NULL)
return FALSE;
gtk_tree_model_get_iter(model1, &iter, path);
gtk_tree_model_get(model1, &iter, COL_MENU, &menu, -1);
if (event->type == GDK_2BUTTON_PRESS) {
toggle_sym_value(menu);
current = menu;
display_tree_part();
} else {
browsed = menu;
display_tree_part();
}
gtk_widget_realize(tree2_w);
gtk_tree_view_set_cursor(view, path, NULL, FALSE);
gtk_widget_grab_focus(tree2_w);
return FALSE;
}
/* Fill a row of strings */
static gchar **fill_row(struct menu *menu)
{
static gchar *row[COL_NUMBER];
struct symbol *sym = menu->sym;
const char *def;
int stype;
tristate val;
enum prop_type ptype;
int i;
for (i = COL_OPTION; i <= COL_COLOR; i++)
g_free(row[i]);
bzero(row, sizeof(row));
row[COL_OPTION] =
g_strdup_printf("%s %s", _(menu_get_prompt(menu)),
sym && !sym_has_value(sym) ? "(NEW)" : "");
if (opt_mode == OPT_ALL && !menu_is_visible(menu))
row[COL_COLOR] = g_strdup("DarkGray");
else if (opt_mode == OPT_PROMPT &&
menu_has_prompt(menu) && !menu_is_visible(menu))
row[COL_COLOR] = g_strdup("DarkGray");
else
row[COL_COLOR] = g_strdup("Black");
ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
switch (ptype) {
case P_MENU:
row[COL_PIXBUF] = (gchar *) xpm_menu;
if (view_mode == SINGLE_VIEW)
row[COL_PIXVIS] = GINT_TO_POINTER(TRUE);
row[COL_BTNVIS] = GINT_TO_POINTER(FALSE);
break;
case P_COMMENT:
row[COL_PIXBUF] = (gchar *) xpm_void;
row[COL_PIXVIS] = GINT_TO_POINTER(FALSE);
row[COL_BTNVIS] = GINT_TO_POINTER(FALSE);
break;
default:
row[COL_PIXBUF] = (gchar *) xpm_void;
row[COL_PIXVIS] = GINT_TO_POINTER(FALSE);
row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
break;
}
if (!sym)
return row;
row[COL_NAME] = g_strdup(sym->name);
sym_calc_value(sym);
sym->flags &= ~SYMBOL_CHANGED;
if (sym_is_choice(sym)) { // parse childs for getting final value
struct menu *child;
struct symbol *def_sym = sym_get_choice_value(sym);
struct menu *def_menu = NULL;
row[COL_BTNVIS] = GINT_TO_POINTER(FALSE);
for (child = menu->list; child; child = child->next) {
if (menu_is_visible(child)
&& child->sym == def_sym)
def_menu = child;
}
if (def_menu)
row[COL_VALUE] =
g_strdup(_(menu_get_prompt(def_menu)));
}
if (sym->flags & SYMBOL_CHOICEVAL)
row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);
stype = sym_get_type(sym);
switch (stype) {
case S_BOOLEAN:
if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE)
row[COL_BTNVIS] = GINT_TO_POINTER(TRUE);
if (sym_is_choice(sym))
break;
/* fall through */
case S_TRISTATE:
val = sym_get_tristate_value(sym);
switch (val) {
case no:
row[COL_NO] = g_strdup("N");
row[COL_VALUE] = g_strdup("N");
row[COL_BTNACT] = GINT_TO_POINTER(FALSE);
row[COL_BTNINC] = GINT_TO_POINTER(FALSE);
break;
case mod:
row[COL_MOD] = g_strdup("M");
row[COL_VALUE] = g_strdup("M");
row[COL_BTNINC] = GINT_TO_POINTER(TRUE);
break;
case yes:
row[COL_YES] = g_strdup("Y");
row[COL_VALUE] = g_strdup("Y");
row[COL_BTNACT] = GINT_TO_POINTER(TRUE);
row[COL_BTNINC] = GINT_TO_POINTER(FALSE);
break;
}
if (val != no && sym_tristate_within_range(sym, no))
row[COL_NO] = g_strdup("_");
if (val != mod && sym_tristate_within_range(sym, mod))
row[COL_MOD] = g_strdup("_");
if (val != yes && sym_tristate_within_range(sym, yes))
row[COL_YES] = g_strdup("_");
break;
case S_INT:
case S_HEX:
case S_STRING:
def = sym_get_string_value(sym);
row[COL_VALUE] = g_strdup(def);
row[COL_EDIT] = GINT_TO_POINTER(TRUE);
row[COL_BTNVIS] = GINT_TO_POINTER(FALSE);
break;
}
return row;
}
/* Set the node content with a row of strings */
static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row)
{
GdkColor color;
gboolean success;
GdkPixbuf *pix;
pix = gdk_pixbuf_new_from_xpm_data((const char **)
row[COL_PIXBUF]);
gdk_color_parse(row[COL_COLOR], &color);
gdk_colormap_alloc_colors(gdk_colormap_get_system(), &color, 1,
FALSE, FALSE, &success);
gtk_tree_store_set(tree, node,
COL_OPTION, row[COL_OPTION],
COL_NAME, row[COL_NAME],
COL_NO, row[COL_NO],
COL_MOD, row[COL_MOD],
COL_YES, row[COL_YES],
COL_VALUE, row[COL_VALUE],
COL_MENU, (gpointer) menu,
COL_COLOR, &color,
COL_EDIT, GPOINTER_TO_INT(row[COL_EDIT]),
COL_PIXBUF, pix,
COL_PIXVIS, GPOINTER_TO_INT(row[COL_PIXVIS]),
COL_BTNVIS, GPOINTER_TO_INT(row[COL_BTNVIS]),
COL_BTNACT, GPOINTER_TO_INT(row[COL_BTNACT]),
COL_BTNINC, GPOINTER_TO_INT(row[COL_BTNINC]),
COL_BTNRAD, GPOINTER_TO_INT(row[COL_BTNRAD]),
-1);
g_object_unref(pix);
}
/* Add a node to the tree */
static void place_node(struct menu *menu, char **row)
{
GtkTreeIter *parent = parents[indent - 1];
GtkTreeIter *node = parents[indent];
gtk_tree_store_append(tree, node, parent);
set_node(node, menu, row);
}
/* Find a node in the GTK+ tree */
static GtkTreeIter found;
/*
* Find a menu in the GtkTree starting at parent.
*/
GtkTreeIter *gtktree_iter_find_node(GtkTreeIter * parent,
struct menu *tofind)
{
GtkTreeIter iter;
GtkTreeIter *child = &iter;
gboolean valid;
GtkTreeIter *ret;
valid = gtk_tree_model_iter_children(model2, child, parent);
while (valid) {
struct menu *menu;
gtk_tree_model_get(model2, child, 6, &menu, -1);
if (menu == tofind) {
memcpy(&found, child, sizeof(GtkTreeIter));
return &found;
}
ret = gtktree_iter_find_node(child, tofind);
if (ret)
return ret;
valid = gtk_tree_model_iter_next(model2, child);
}
return NULL;
}
/*
* Update the tree by adding/removing entries
* Does not change other nodes
*/
static void update_tree(struct menu *src, GtkTreeIter * dst)
{
struct menu *child1;
GtkTreeIter iter, tmp;
GtkTreeIter *child2 = &iter;
gboolean valid;
GtkTreeIter *sibling;
struct symbol *sym;
struct menu *menu1, *menu2;
if (src == &rootmenu)
indent = 1;
valid = gtk_tree_model_iter_children(model2, child2, dst);
for (child1 = src->list; child1; child1 = child1->next) {
sym = child1->sym;
reparse:
menu1 = child1;
if (valid)
gtk_tree_model_get(model2, child2, COL_MENU,
&menu2, -1);
else
menu2 = NULL; // force adding of a first child
#ifdef DEBUG
printf("%*c%s | %s\n", indent, ' ',
menu1 ? menu_get_prompt(menu1) : "nil",
menu2 ? menu_get_prompt(menu2) : "nil");
#endif
if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) ||
(opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) ||
(opt_mode == OPT_ALL && !menu_get_prompt(child1))) {
/* remove node */
if (gtktree_iter_find_node(dst, menu1) != NULL) {
memcpy(&tmp, child2, sizeof(GtkTreeIter));
valid = gtk_tree_model_iter_next(model2,
child2);
gtk_tree_store_remove(tree2, &tmp);
if (!valid)
return; /* next parent */
else
goto reparse; /* next child */
} else
continue;
}
if (menu1 != menu2) {
if (gtktree_iter_find_node(dst, menu1) == NULL) { // add node
if (!valid && !menu2)
sibling = NULL;
else
sibling = child2;
gtk_tree_store_insert_before(tree2,
child2,
dst, sibling);
set_node(child2, menu1, fill_row(menu1));
if (menu2 == NULL)
valid = TRUE;
} else { // remove node
memcpy(&tmp, child2, sizeof(GtkTreeIter));
valid = gtk_tree_model_iter_next(model2,
child2);
gtk_tree_store_remove(tree2, &tmp);
if (!valid)
return; // next parent
else
goto reparse; // next child
}
} else if (sym && (sym->flags & SYMBOL_CHANGED)) {
set_node(child2, menu1, fill_row(menu1));
}
indent++;
update_tree(child1, child2);
indent--;
valid = gtk_tree_model_iter_next(model2, child2);
}
}
/* Display the whole tree (single/split/full view) */
static void display_tree(struct menu *menu)
{
struct symbol *sym;
struct property *prop;
struct menu *child;
enum prop_type ptype;
if (menu == &rootmenu) {
indent = 1;
current = &rootmenu;
}
for (child = menu->list; child; child = child->next) {
prop = child->prompt;
sym = child->sym;
ptype = prop ? prop->type : P_UNKNOWN;
if (sym)
sym->flags &= ~SYMBOL_CHANGED;
if ((view_mode == SPLIT_VIEW)
&& !(child->flags & MENU_ROOT) && (tree == tree1))
continue;
if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT)
&& (tree == tree2))
continue;
if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) ||
(opt_mode == OPT_PROMPT && menu_has_prompt(child)) ||
(opt_mode == OPT_ALL && menu_get_prompt(child)))
place_node(child, fill_row(child));
#ifdef DEBUG
printf("%*c%s: ", indent, ' ', menu_get_prompt(child));
printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : "");
printf("%s", prop_get_type_name(ptype));
printf(" | ");
if (sym) {
printf("%s", sym_type_name(sym->type));
printf(" | ");
printf("%s", dbg_sym_flags(sym->flags));
printf("\n");
} else
printf("\n");
#endif
if ((view_mode != FULL_VIEW) && (ptype == P_MENU)
&& (tree == tree2))
continue;
/*
if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT))
|| (view_mode == FULL_VIEW)
|| (view_mode == SPLIT_VIEW))*/
/* Change paned position if the view is not in 'split mode' */
if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) {
gtk_paned_set_position(GTK_PANED(hpaned), 0);
}
if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT))
|| (view_mode == FULL_VIEW)
|| (view_mode == SPLIT_VIEW)) {
indent++;
display_tree(child);
indent--;
}
}
}
/* Display a part of the tree starting at current node (single/split view) */
static void display_tree_part(void)
{
if (tree2)
gtk_tree_store_clear(tree2);
if (view_mode == SINGLE_VIEW)
display_tree(current);
else if (view_mode == SPLIT_VIEW)
display_tree(browsed);
gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w));
}
/* Display the list in the left frame (split view) */
static void display_list(void)
{
if (tree1)
gtk_tree_store_clear(tree1);
tree = tree1;
display_tree(&rootmenu);
gtk_tree_view_expand_all(GTK_TREE_VIEW(tree1_w));
tree = tree2;
}
void fixup_rootmenu(struct menu *menu)
{
struct menu *child;
static int menu_cnt = 0;
menu->flags |= MENU_ROOT;
for (child = menu->list; child; child = child->next) {
if (child->prompt && child->prompt->type == P_MENU) {
menu_cnt++;
fixup_rootmenu(child);
menu_cnt--;
} else if (!menu_cnt)
fixup_rootmenu(child);
}
}
/* Main */
int main(int ac, char *av[])
{
const char *name;
char *env;
gchar *glade_file;
bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE);
/* GTK stuffs */
gtk_set_locale();
gtk_init(&ac, &av);
glade_init();
//add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
//add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");
/* Determine GUI path */
env = getenv(SRCTREE);
if (env)
glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL);
else if (av[0][0] == '/')
glade_file = g_strconcat(av[0], ".glade", NULL);
else
glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);
/* Conf stuffs */
if (ac > 1 && av[1][0] == '-') {
switch (av[1][1]) {
case 'a':
//showAll = 1;
break;
case 'h':
case '?':
printf("%s <config>\n", av[0]);
exit(0);
}
name = av[2];
} else
name = av[1];
conf_parse(name);
fixup_rootmenu(&rootmenu);
conf_read(NULL);
/* Load the interface and connect signals */
init_main_window(glade_file);
init_tree_model();
init_left_tree();
init_right_tree();
switch (view_mode) {
case SINGLE_VIEW:
display_tree_part();
break;
case SPLIT_VIEW:
display_list();
break;
case FULL_VIEW:
display_tree(&rootmenu);
break;
}
gtk_main();
return 0;
}
static void conf_changed(void)
{
bool changed = conf_get_changed();
gtk_widget_set_sensitive(save_btn, changed);
gtk_widget_set_sensitive(save_menu_item, changed);
}
================================================
FILE: kconfig/gconf.glade
================================================
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<glade-interface>
<widget class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="title" translatable="yes">Gtk Kernel Configurator</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">640</property>
<property name="default_height">480</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<signal name="destroy" handler="on_window1_destroy" object="window1"/>
<signal name="size_request" handler="on_window1_size_request" object="vpaned1" last_modification_time="Fri, 11 Jan 2002 16:17:11 GMT"/>
<signal name="delete_event" handler="on_window1_delete_event" object="window1" last_modification_time="Sun, 09 Mar 2003 19:42:46 GMT"/>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkMenuBar" id="menubar1">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="file1">
<property name="visible">True</property>
<property name="label" translatable="yes">_File</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="file1_menu">
<child>
<widget class="GtkImageMenuItem" id="load1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Load a config file</property>
<property name="label" translatable="yes">_Load</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_load1_activate"/>
<accelerator key="L" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image39">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="save1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Save the config in .config</property>
<property name="label" translatable="yes">_Save</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_save_activate"/>
<accelerator key="S" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image40">
<property name="visible">True</property>
<property name="stock">gtk-save</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="save_as1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Save the config in a file</property>
<property name="label" translatable="yes">Save _as</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_save_as1_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image41">
<property name="visible">True</property>
<property name="stock">gtk-save-as</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="quit1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Quit</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_quit1_activate"/>
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image42">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="options1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Options</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="options1_menu">
<child>
<widget class="GtkCheckMenuItem" id="show_name1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show name</property>
<property name="label" translatable="yes">Show _name</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_name1_activate"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_range1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show range (Y/M/N)</property>
<property name="label" translatable="yes">Show _range</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_range1_activate"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_data1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show value of the option</property>
<property name="label" translatable="yes">Show _data</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_data1_activate"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkRadioMenuItem" id="set_option_mode1">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show normal options</property>
<property name="label" translatable="yes">Show normal options</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<signal name="activate" handler="on_set_option_mode1_activate"/>
</widget>
</child>
<child>
<widget class="GtkRadioMenuItem" id="set_option_mode2">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show all options</property>
<property name="label" translatable="yes">Show all _options</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<property name="group">set_option_mode1</property>
<signal name="activate" handler="on_set_option_mode2_activate"/>
</widget>
</child>
<child>
<widget class="GtkRadioMenuItem" id="set_option_mode3">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">Show all options with prompts</property>
<property name="label" translatable="yes">Show all prompt options</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<property name="group">set_option_mode1</property>
<signal name="activate" handler="on_set_option_mode3_activate"/>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="help1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="help1_menu">
<child>
<widget class="GtkImageMenuItem" id="introduction1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Introduction</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_introduction1_activate" last_modification_time="Fri, 15 Nov 2002 20:26:30 GMT"/>
<accelerator key="I" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image43">
<property name="visible">True</property>
<property name="stock">gtk-dialog-question</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="about1">
<property name="visible">True</property>
<property name="label" translatable="yes">_About</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_about1_activate" last_modification_time="Fri, 15 Nov 2002 20:26:30 GMT"/>
<accelerator key=
gitextract_hhcit_l3/ ├── .gitignore ├── .gitmodules ├── .project ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── defconfig/ │ ├── lpc1769.config │ ├── lpc17xx.config │ ├── qemu-orig.config │ ├── qemu.config │ ├── qemunet.config │ ├── stm32f407-discovery.config │ ├── stm32f429i-discovery.config │ ├── stm32f746-discovery.config │ ├── stm32f746-nucleo.config │ └── stm32f769-discovery.config ├── gdbinit.bflt ├── gdbinit.mini ├── include/ │ └── frosted_api.h ├── kconfig/ │ ├── .gitignore │ ├── Kconfig │ ├── Makefile │ ├── Makefile.frosted │ ├── POTFILES.in │ ├── STM32F4x1Discovery.cfg │ ├── check.sh │ ├── conf.c │ ├── confdata.c │ ├── expr.c │ ├── expr.h │ ├── frosted.conf │ ├── gconf.c │ ├── gconf.glade │ ├── images.c │ ├── kxgettext.c │ ├── list.h │ ├── lkc.h │ ├── lkc_proto.h │ ├── lpc17xx.cfg │ ├── mconf.c │ ├── menu.c │ ├── merge_config.sh │ ├── nconf.c │ ├── nconf.gui.c │ ├── nconf.h │ ├── qconf.cc │ ├── qconf.h │ ├── qemu2.cfg │ ├── streamline_config.pl │ ├── symbol.c │ ├── util.c │ ├── zconf.gperf │ ├── zconf.hash.c_shipped │ ├── zconf.l │ ├── zconf.lex.c_shipped │ ├── zconf.tab.c_shipped │ └── zconf.y ├── kernel/ │ ├── Kconfig │ ├── adc.h │ ├── bflt.c │ ├── bflt.h │ ├── cdc_acm.h │ ├── cdc_ecm.h │ ├── cirbuf.c │ ├── cirbuf.h │ ├── crypto/ │ │ ├── aes.c │ │ ├── aes.h │ │ ├── misc.c │ │ ├── misc.h │ │ ├── sha256.c │ │ └── sha256.h │ ├── device.h │ ├── drivers/ │ │ ├── device.c │ │ ├── devusb_cdc_ecm.c │ │ ├── dma.h │ │ ├── dsp.h │ │ ├── eth.h │ │ ├── exti.c │ │ ├── exti.h │ │ ├── fbcon.c │ │ ├── fbcon.h │ │ ├── fonts.h │ │ ├── fortuna.c │ │ ├── framebuffer.h │ │ ├── frand.c │ │ ├── ft5336.c │ │ ├── gpio.c │ │ ├── gpio.h │ │ ├── i2c.h │ │ ├── ili9341.c │ │ ├── l3gd20.c │ │ ├── l3gd20.h │ │ ├── lis3dsh.c │ │ ├── lis3dsh.h │ │ ├── lm3s_eth.c │ │ ├── lsm303dlhc.c │ │ ├── lsm303dlhc.h │ │ ├── ltdc.h │ │ ├── mccog21.c │ │ ├── null.c │ │ ├── pty.c │ │ ├── pty.h │ │ ├── rng.h │ │ ├── sdio.h │ │ ├── sdram.h │ │ ├── socket_in.c │ │ ├── socket_in.h │ │ ├── socket_un.c │ │ ├── spi.h │ │ ├── stm32_dma.c │ │ ├── stm32_eth.c │ │ ├── stm32_i2c.c │ │ ├── stm32_lowpower.c │ │ ├── stm32_rng.c │ │ ├── stm32_sdio.c │ │ ├── stm32_sdio.h │ │ ├── stm32_spi.c │ │ ├── stm32_usb.c │ │ ├── stm32f4_adc.c │ │ ├── stm32f4_dsp.c │ │ ├── stm32f4_sdram.c │ │ ├── stm32f7_ltdc.c │ │ ├── stm32f7_sdram.c │ │ ├── stmpe811.c │ │ ├── stmpe811.h │ │ ├── tty_console.c │ │ ├── tty_console.h │ │ ├── uart.c │ │ ├── uart.h │ │ ├── uart_dev.h │ │ ├── usb/ │ │ │ ├── usb_kbd.c │ │ │ └── usbh_drivers.h │ │ ├── usb.h │ │ └── xadow_LED_5x7.c │ ├── fonts/ │ │ ├── cga_8x8.c │ │ ├── palette_256_xterm.c │ │ └── piccolo_7x6.c │ ├── fortuna.h │ ├── fpb.c │ ├── fpb.h │ ├── framebuffer.c │ ├── frand.h │ ├── frosted.c │ ├── frosted.h │ ├── fs/ │ │ ├── fatfs.c │ │ ├── fatfs.h │ │ ├── memfs.c │ │ ├── sysfs.c │ │ ├── xipfs.c │ │ └── xipfs.h │ ├── getaddrinfo.c │ ├── hardfault_debug.c │ ├── heap.h │ ├── interrupts.h │ ├── kprintf.c │ ├── kprintf.h │ ├── lm3s/ │ │ ├── Kconfig │ │ ├── lm3s.c │ │ ├── lm3s.ld.in │ │ └── lm3s6965evb.c │ ├── locks.c │ ├── locks.h │ ├── lowpower.h │ ├── lpc17xx/ │ │ ├── Kconfig │ │ ├── lpc1768mbed.c │ │ ├── lpc1769xpresso.c │ │ └── lpc17xx.ld.in │ ├── lpc17xx.h │ ├── malloc.c │ ├── malloc.h │ ├── module.c │ ├── mpu.c │ ├── mpu.h │ ├── mutex.S │ ├── net/ │ │ ├── Kconfig │ │ ├── if.h │ │ ├── pico_lock.c │ │ └── route.h │ ├── nrf51/ │ │ ├── Kconfig │ │ ├── blenanov1_5.c │ │ └── nrf51.ld.in │ ├── nrf52/ │ │ ├── Kconfig │ │ ├── blenanov2_0.c │ │ └── nrf52.ld.in │ ├── null.h │ ├── pico_port.h │ ├── pipe.c │ ├── scheduler.c │ ├── scheduler.h │ ├── semaphore.S │ ├── stm32f4/ │ │ ├── Kconfig │ │ ├── stm32f4.ld.in │ │ ├── stm32f407discovery.c │ │ ├── stm32f407diymore.c │ │ ├── stm32f411nucleo.c │ │ ├── stm32f429discovery.c │ │ ├── stm32f446nucleo.c │ │ ├── stm32f4x1discovery.c │ │ └── stm32f4xxpyboard.c │ ├── stm32f7/ │ │ ├── Kconfig │ │ ├── stm32f7.ld.in │ │ ├── stm32f746discovery.c │ │ ├── stm32f746nucleo-144.c │ │ └── stm32f769discovery.c │ ├── string.c │ ├── string.h │ ├── sys.c │ ├── syscall_table_gen.py │ ├── syscall_vector.c │ ├── systick.c │ ├── tasklet.c │ ├── term.c │ ├── vfs.c │ └── vfs.h ├── qemu.gdbinit ├── rules/ │ ├── arch.mk │ ├── config.mk │ ├── picotcp.mk │ └── userspace.mk ├── scripts/ │ ├── frosted-dev-setup │ └── frosted-qemu-setup └── xipfs.h
SYMBOL INDEX (2338 symbols across 135 files)
FILE: include/frosted_api.h
type DIR (line 35) | typedef void DIR;
type semaphore (line 38) | struct semaphore
type sem_t (line 39) | typedef struct semaphore sem_t;
type mutex_t (line 40) | typedef struct semaphore mutex_t;
type dirent (line 43) | struct dirent {
type sockaddr (line 63) | struct __attribute__((packed)) sockaddr {
type sockaddr_un (line 68) | struct __attribute__((packed)) sockaddr_un {
type sockaddr_env (line 73) | struct sockaddr_env {
FILE: kconfig/conf.c
type menu (line 20) | struct menu
type menu (line 21) | struct menu
type input_mode (line 24) | enum input_mode {
type menu (line 45) | struct menu
function print_help (line 47) | static void print_help(struct menu *menu)
function strip (line 57) | static void strip(char *str)
function check_stdin (line 74) | static void check_stdin(void)
function conf_askvalue (line 84) | static int conf_askvalue(struct symbol *sym, const char *def)
function conf_string (line 133) | static int conf_string(struct menu *menu)
function conf_sym (line 166) | static int conf_sym(struct menu *menu)
function conf_choice (line 235) | static int conf_choice(struct menu *menu)
function conf (line 354) | static void conf(struct menu *menu)
function check_conf (line 420) | static void check_conf(struct menu *menu)
type option (line 449) | struct option
function conf_usage (line 471) | static void conf_usage(const char *progname)
function main (line 491) | int main(int ac, char **av)
function xfgets (line 714) | void xfgets(char *str, int size, FILE *in)
FILE: kconfig/confdata.c
function conf_warning (line 30) | static void conf_warning(const char *fmt, ...)
function conf_default_message_callback (line 41) | static void conf_default_message_callback(const char *fmt, va_list ap)
function conf_set_message_callback (line 50) | void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap))
function conf_message (line 55) | static void conf_message(const char *fmt, ...)
type symbol (line 80) | struct symbol
type stat (line 106) | struct stat
function conf_set_sym_val (line 120) | static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, ...
function add_byte (line 191) | static int add_byte(int c, char **lineptr, size_t slen, size_t *n)
function compat_getline (line 211) | static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream)
function conf_read_simple (line 245) | int conf_read_simple(const char *name, int def)
function conf_read (line 407) | int conf_read(const char *name)
function kconfig_print_symbol (line 481) | static void
function kconfig_print_comment (line 504) | static void
type conf_printer (line 524) | struct conf_printer
function header_print_symbol (line 535) | static void
function header_print_comment (line 576) | static void
type conf_printer (line 598) | struct conf_printer
function tristate_print_symbol (line 609) | static void
type conf_printer (line 617) | struct conf_printer
function conf_write_symbol (line 623) | static void conf_write_symbol(FILE *fp, struct symbol *sym,
function conf_write_heading (line 644) | static void
function conf_write_defconfig (line 662) | int conf_write_defconfig(const char *filename)
function conf_write (line 735) | int conf_write(const char *name)
function conf_split_config (line 835) | static int conf_split_config(void)
function conf_write_autoconf (line 947) | int conf_write_autoconf(void)
function sym_set_change_count (line 1024) | void sym_set_change_count(int count)
function sym_add_change_count (line 1033) | void sym_add_change_count(int count)
function conf_get_changed (line 1038) | bool conf_get_changed(void)
function conf_set_changed_callback (line 1043) | void conf_set_changed_callback(void (*fn)(void))
function randomize_choice_values (line 1048) | static bool randomize_choice_values(struct symbol *csym)
function set_all_choice_values (line 1096) | void set_all_choice_values(struct symbol *csym)
function conf_set_all_new_symbols (line 1116) | bool conf_set_all_new_symbols(enum conf_def_mode mode)
FILE: kconfig/expr.c
type expr (line 14) | struct expr
type symbol (line 14) | struct symbol
type expr (line 16) | struct expr
type expr (line 22) | struct expr
type expr_type (line 22) | enum expr_type
type expr (line 22) | struct expr
type expr (line 24) | struct expr
type expr (line 30) | struct expr
type expr_type (line 30) | enum expr_type
type expr (line 30) | struct expr
type expr (line 30) | struct expr
type expr (line 32) | struct expr
type expr (line 39) | struct expr
type expr_type (line 39) | enum expr_type
type symbol (line 39) | struct symbol
type symbol (line 39) | struct symbol
type expr (line 41) | struct expr
type expr (line 48) | struct expr
type expr (line 48) | struct expr
type expr (line 48) | struct expr
type expr (line 55) | struct expr
type expr (line 55) | struct expr
type expr (line 55) | struct expr
type expr (line 62) | struct expr
type expr (line 62) | struct expr
type expr (line 64) | struct expr
function expr_free (line 99) | void expr_free(struct expr *e)
function __expr_eliminate_eq (line 130) | static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, ...
function expr_eliminate_eq (line 164) | void expr_eliminate_eq(struct expr **ep1, struct expr **ep2)
function expr_eq (line 189) | int expr_eq(struct expr *e1, struct expr *e2)
type expr (line 231) | struct expr
type expr (line 231) | struct expr
type expr (line 233) | struct expr
type expr (line 317) | struct expr
type expr (line 317) | struct expr
type expr (line 346) | struct expr
type expr (line 346) | struct expr
type expr (line 346) | struct expr
type expr (line 348) | struct expr
type symbol (line 349) | struct symbol
type expr (line 410) | struct expr
type expr (line 410) | struct expr
type expr (line 410) | struct expr
type expr (line 412) | struct expr
type symbol (line 413) | struct symbol
function expr_eliminate_dups1 (line 504) | static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1,...
function expr_eliminate_dups2 (line 556) | static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1,...
type expr (line 612) | struct expr
type expr (line 612) | struct expr
type expr (line 636) | struct expr
type expr (line 636) | struct expr
type expr (line 638) | struct expr
function expr_contains_symbol (line 773) | int expr_contains_symbol(struct expr *dep, struct symbol *sym)
function expr_depends_symbol (line 797) | bool expr_depends_symbol(struct expr *dep, struct symbol *sym)
type expr (line 826) | struct expr
type expr (line 826) | struct expr
type expr (line 826) | struct expr
type expr (line 828) | struct expr
type expr (line 837) | struct expr
type expr (line 837) | struct expr
type expr (line 837) | struct expr
type expr (line 839) | struct expr
function expr_extract_eq (line 848) | void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr ...
type expr (line 877) | struct expr
type expr (line 877) | struct expr
type expr_type (line 877) | enum expr_type
type symbol (line 877) | struct symbol
type expr (line 879) | struct expr
function tristate (line 938) | tristate expr_calc_value(struct expr *e)
function expr_compare_type (line 979) | int expr_compare_type(enum expr_type t1, enum expr_type t2)
type expr (line 1011) | struct expr
type expr (line 1012) | struct expr
type expr (line 1028) | struct expr
type expr (line 1028) | struct expr
type expr (line 1028) | struct expr
type expr (line 1030) | struct expr
type expr (line 1038) | struct expr
function expr_print (line 1053) | void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, cons...
function expr_print_file_helper (line 1125) | static void expr_print_file_helper(void *data, struct symbol *sym, const...
function expr_fprint (line 1130) | void expr_fprint(struct expr *e, FILE *out)
function expr_print_gstr_helper (line 1135) | static void expr_print_gstr_helper(void *data, struct symbol *sym, const...
function expr_gstr_print (line 1165) | void expr_gstr_print(struct expr *e, struct gstr *gs)
FILE: kconfig/expr.h
type file (line 20) | struct file {
type tristate (line 27) | typedef enum tristate {
type expr_type (line 31) | enum expr_type {
type expr (line 36) | struct expr
type symbol (line 37) | struct symbol
type expr (line 40) | struct expr {
type expr_value (line 52) | struct expr_value {
type symbol_value (line 57) | struct symbol_value {
type symbol_type (line 62) | enum symbol_type {
type symbol (line 75) | struct symbol {
type prop_type (line 129) | enum prop_type {
type property (line 142) | struct property {
type menu (line 165) | struct menu {
type jump_key (line 183) | struct jump_key {
type file (line 192) | struct file
type file (line 193) | struct file
type file (line 194) | struct file
type symbol (line 196) | struct symbol
type symbol (line 197) | struct symbol
type symbol (line 198) | struct symbol
type expr (line 200) | struct expr
type symbol (line 200) | struct symbol
type expr (line 201) | struct expr
type expr_type (line 201) | enum expr_type
type expr (line 201) | struct expr
type expr (line 202) | struct expr
type expr_type (line 202) | enum expr_type
type expr (line 202) | struct expr
type expr (line 202) | struct expr
type expr (line 203) | struct expr
type expr_type (line 203) | enum expr_type
type symbol (line 203) | struct symbol
type symbol (line 203) | struct symbol
type expr (line 204) | struct expr
type expr (line 204) | struct expr
type expr (line 204) | struct expr
type expr (line 205) | struct expr
type expr (line 205) | struct expr
type expr (line 205) | struct expr
type expr (line 206) | struct expr
type expr (line 206) | struct expr
type expr (line 207) | struct expr
type expr (line 208) | struct expr
type expr (line 208) | struct expr
type expr (line 209) | struct expr
type expr (line 209) | struct expr
type expr (line 210) | struct expr
type expr (line 211) | struct expr
type expr (line 211) | struct expr
type expr (line 212) | struct expr
type expr (line 212) | struct expr
type expr (line 213) | struct expr
type expr (line 213) | struct expr
type expr (line 214) | struct expr
type expr (line 214) | struct expr
type expr (line 215) | struct expr
type symbol (line 215) | struct symbol
type expr (line 216) | struct expr
type symbol (line 216) | struct symbol
type expr (line 217) | struct expr
type expr (line 217) | struct expr
type expr (line 217) | struct expr
type expr (line 218) | struct expr
type expr (line 218) | struct expr
type expr (line 218) | struct expr
type expr_type (line 219) | enum expr_type
type expr (line 219) | struct expr
type expr (line 219) | struct expr
type expr (line 219) | struct expr
type expr (line 220) | struct expr
type expr (line 220) | struct expr
type expr_type (line 220) | enum expr_type
type symbol (line 220) | struct symbol
type expr (line 221) | struct expr
type expr (line 221) | struct expr
type expr (line 221) | struct expr
type expr (line 223) | struct expr
type gstr (line 224) | struct gstr
type expr (line 225) | struct expr
type gstr (line 225) | struct gstr
function expr_is_yes (line 227) | static inline int expr_is_yes(struct expr *e)
function expr_is_no (line 232) | static inline int expr_is_no(struct expr *e)
FILE: kconfig/gconf.c
type menu (line 62) | struct menu
type menu (line 63) | struct menu
type menu (line 73) | struct menu
type menu (line 75) | struct menu
type menu (line 76) | struct menu
type menu (line 77) | struct menu
function replace_button_icon (line 112) | void replace_button_icon(GladeXML * xml, GdkDrawable * window,
function init_main_window (line 131) | void init_main_window(const gchar * glade_file)
function init_tree_model (line 217) | void init_tree_model(void)
function init_left_tree (line 247) | void init_left_tree(void)
function init_right_tree (line 289) | void init_right_tree(void)
function text_insert_help (line 391) | static void text_insert_help(struct menu *menu)
function text_insert_msg (line 416) | static void text_insert_msg(const char *title, const char *message)
function gboolean (line 440) | gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event,
function on_window1_destroy (line 485) | void on_window1_destroy(GtkObject * object, gpointer user_data)
function on_window1_size_request (line 491) | void
function load_filename (line 514) | static void
function on_load1_activate (line 528) | void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_save_activate (line 548) | void on_save_activate(GtkMenuItem * menuitem, gpointer user_data)
function store_filename (line 555) | static void
function on_save_as1_activate (line 569) | void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_quit1_activate (line 589) | void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_show_name1_activate (line 596) | void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_show_range1_activate (line 607) | void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_show_data1_activate (line 625) | void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_set_option_mode1_activate (line 636) | void
function on_set_option_mode2_activate (line 645) | void
function on_set_option_mode3_activate (line 654) | void
function on_introduction1_activate (line 663) | void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_about1_activate (line 694) | void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_license1_activate (line 712) | void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data)
function on_back_clicked (line 731) | void on_back_clicked(GtkButton * button, gpointer user_data)
function on_load_clicked (line 746) | void on_load_clicked(GtkButton * button, gpointer user_data)
function on_single_clicked (line 752) | void on_single_clicked(GtkButton * button, gpointer user_data)
function on_split_clicked (line 761) | void on_split_clicked(GtkButton * button, gpointer user_data)
function on_full_clicked (line 777) | void on_full_clicked(GtkButton * button, gpointer user_data)
function on_collapse_clicked (line 788) | void on_collapse_clicked(GtkButton * button, gpointer user_data)
function on_expand_clicked (line 794) | void on_expand_clicked(GtkButton * button, gpointer user_data)
function renderer_edited (line 803) | static void renderer_edited(GtkCellRendererText * cell,
function change_sym_value (line 830) | static void change_sym_value(struct menu *menu, gint col)
function toggle_sym_value (line 870) | static void toggle_sym_value(struct menu *menu)
function gint (line 886) | static gint column2index(GtkTreeViewColumn * column)
function gboolean (line 903) | gboolean
function gboolean (line 960) | gboolean
function on_treeview2_cursor_changed (line 1005) | void
function gboolean (line 1021) | gboolean
function gchar (line 1061) | static gchar **fill_row(struct menu *menu)
function set_node (line 1186) | static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row)
function place_node (line 1222) | static void place_node(struct menu *menu, char **row)
function GtkTreeIter (line 1238) | GtkTreeIter *gtktree_iter_find_node(GtkTreeIter * parent,
function update_tree (line 1272) | static void update_tree(struct menu *src, GtkTreeIter * dst)
function display_tree (line 1358) | static void display_tree(struct menu *menu)
function display_tree_part (line 1427) | static void display_tree_part(void)
function display_list (line 1439) | static void display_list(void)
function fixup_rootmenu (line 1450) | void fixup_rootmenu(struct menu *menu)
function main (line 1468) | int main(int ac, char *av[])
function conf_changed (line 1537) | static void conf_changed(void)
FILE: kconfig/kxgettext.c
type file_line (line 63) | struct file_line {
type file_line (line 69) | struct file_line
type file_line (line 71) | struct file_line
type message (line 83) | struct message {
type message (line 90) | struct message
type message (line 92) | struct message
type message (line 95) | struct message
type message (line 120) | struct message
type message (line 122) | struct message
function message__add_file_line (line 133) | static int message__add_file_line(struct message *self, const char *file,
function message__add (line 149) | static int message__add(const char *msg, char *option, const char *file,
function menu_build_message_list (line 171) | static void menu_build_message_list(struct menu *menu)
function message__print_file_lineno (line 189) | static void message__print_file_lineno(struct message *self)
function message__print_gettext_msgid_msgstr (line 208) | static void message__print_gettext_msgid_msgstr(struct message *self)
function menu__xgettext (line 216) | static void menu__xgettext(void)
function main (line 228) | int main(int ac, char **av)
FILE: kconfig/list.h
type list_head (line 23) | struct list_head {
function list_empty (line 70) | static inline int list_empty(const struct list_head *head)
function __list_add (line 81) | static inline void __list_add(struct list_head *_new,
function list_add_tail (line 99) | static inline void list_add_tail(struct list_head *_new, struct list_hea...
function __list_del (line 111) | static inline void __list_del(struct list_head *prev, struct list_head *...
function list_del (line 125) | static inline void list_del(struct list_head *entry)
FILE: kconfig/lkc.h
function textdomain (line 15) | static inline void textdomain(const char *domainname) {}
function bindtextdomain (line 16) | static inline void bindtextdomain(const char *name, const char *dir) {}
type conf_def_mode (line 53) | enum conf_def_mode {
type kconf_id (line 66) | struct kconf_id {
type conf_def_mode (line 90) | enum conf_def_mode
type symbol (line 91) | struct symbol
type conf_printer (line 93) | struct conf_printer {
function xfwrite (line 99) | static inline void xfwrite(const void *str, size_t len, size_t count, FI...
type menu (line 109) | struct menu
type menu (line 110) | struct menu
type symbol (line 112) | struct symbol
type expr (line 114) | struct expr
type expr (line 115) | struct expr
type property (line 116) | struct property
type prop_type (line 116) | enum prop_type
type expr (line 116) | struct expr
type expr (line 116) | struct expr
type property (line 117) | struct property
type prop_type (line 117) | enum prop_type
type expr (line 117) | struct expr
type prop_type (line 118) | enum prop_type
type expr (line 118) | struct expr
type expr (line 118) | struct expr
type prop_type (line 119) | enum prop_type
type symbol (line 119) | struct symbol
type expr (line 119) | struct expr
type menu (line 121) | struct menu
type file (line 125) | struct file
type gstr (line 130) | struct gstr {
type gstr (line 139) | struct gstr
type gstr (line 140) | struct gstr
type gstr (line 141) | struct gstr
type gstr (line 142) | struct gstr
type gstr (line 143) | struct gstr
type gstr (line 144) | struct gstr
type expr (line 147) | struct expr
type symbol (line 152) | struct symbol
type symbol (line 153) | struct symbol
type symbol (line 153) | struct symbol
type symbol (line 154) | struct symbol
type symbol (line 155) | struct symbol
type symbol (line 155) | struct symbol
type property (line 156) | struct property
type prop_type (line 156) | enum prop_type
type symbol (line 156) | struct symbol
type symbol (line 157) | struct symbol
type property (line 157) | struct property
type property (line 158) | struct property
type symbol (line 158) | struct symbol
function tristate (line 160) | static inline tristate sym_get_tristate_value(struct symbol *sym)
type symbol (line 166) | struct symbol
type symbol (line 166) | struct symbol
type symbol (line 168) | struct symbol
function sym_set_choice_value (line 171) | static inline bool sym_set_choice_value(struct symbol *ch, struct symbol...
function sym_is_choice (line 176) | static inline bool sym_is_choice(struct symbol *sym)
function sym_is_choice_value (line 181) | static inline bool sym_is_choice_value(struct symbol *sym)
function sym_is_optional (line 186) | static inline bool sym_is_optional(struct symbol *sym)
function sym_has_value (line 191) | static inline bool sym_has_value(struct symbol *sym)
FILE: kconfig/lkc_proto.h
type menu (line 17) | struct menu
type menu (line 18) | struct menu
type menu (line 19) | struct menu
type menu (line 20) | struct menu
type menu (line 21) | struct menu
type menu (line 22) | struct menu
type menu (line 23) | struct menu
type menu (line 24) | struct menu
type gstr (line 25) | struct gstr
type symbol (line 27) | struct symbol
type menu (line 29) | struct menu
type symbol_type (line 39) | enum symbol_type
type symbol (line 40) | struct symbol
type symbol (line 41) | struct symbol
type symbol (line 42) | struct symbol
type symbol (line 43) | struct symbol
type symbol (line 44) | struct symbol
type symbol (line 45) | struct symbol
type symbol (line 46) | struct symbol
type symbol (line 47) | struct symbol
type symbol (line 48) | struct symbol
type symbol (line 49) | struct symbol
type symbol (line 50) | struct symbol
type symbol (line 51) | struct symbol
type prop_type (line 53) | enum prop_type
type expr_type (line 56) | enum expr_type
type expr (line 57) | struct expr
type symbol (line 57) | struct symbol
FILE: kconfig/mconf.c
type menu (line 277) | struct menu
type menu (line 283) | struct menu
type menu (line 283) | struct menu
type menu (line 284) | struct menu
type menu (line 285) | struct menu
type menu (line 293) | struct menu
function set_config_filename (line 296) | static void set_config_filename(const char *config_filename)
type subtitle_part (line 312) | struct subtitle_part {
type subtitle_list (line 318) | struct subtitle_list
function set_subtitle (line 319) | static void set_subtitle(void)
function reset_subtitle (line 345) | static void reset_subtitle(void)
type search_data (line 357) | struct search_data {
function update_text (line 363) | static void update_text(char *buf, size_t start, size_t end, void *_data)
function search_conf (line 390) | static void search_conf(void)
function build_conf (line 465) | static void build_conf(struct menu *menu)
function conf (line 644) | static void conf(struct menu *menu, struct menu *active_menu)
function show_textbox_ext (line 755) | static int show_textbox_ext(const char *title, char *text, int r, int c,...
function show_textbox (line 764) | static void show_textbox(const char *title, const char *text, int r, int c)
function show_helptext (line 770) | static void show_helptext(const char *title, const char *text)
function conf_message_callback (line 775) | static void conf_message_callback(const char *fmt, va_list ap)
function show_help (line 786) | static void show_help(struct menu *menu)
function conf_choice (line 797) | static void conf_choice(struct menu *menu)
function conf_string (line 858) | static void conf_string(struct menu *menu)
function conf_load (line 898) | static void conf_load(void)
function conf_save (line 926) | static void conf_save(void)
function handle_exit (line 952) | static int handle_exit(void)
function sig_handler (line 997) | static void sig_handler(int signo)
function main (line 1002) | int main(int ac, char **av)
FILE: kconfig/menu.c
type menu (line 15) | struct menu
type menu (line 16) | struct menu
type file (line 18) | struct file
type file (line 19) | struct file
function menu_warn (line 21) | void menu_warn(struct menu *menu, const char *fmt, ...)
function prop_warn (line 31) | static void prop_warn(struct property *prop, const char *fmt, ...)
function _menu_init (line 41) | void _menu_init(void)
function menu_add_entry (line 47) | void menu_add_entry(struct symbol *sym)
function menu_end_entry (line 65) | void menu_end_entry(void)
type menu (line 69) | struct menu
function menu_end_menu (line 76) | void menu_end_menu(void)
type expr (line 82) | struct expr
type expr (line 82) | struct expr
function menu_add_dep (line 107) | void menu_add_dep(struct expr *dep)
function menu_set_type (line 112) | void menu_set_type(int type)
type property (line 128) | struct property
type prop_type (line 128) | enum prop_type
type expr (line 128) | struct expr
type expr (line 128) | struct expr
type property (line 130) | struct property
type menu (line 147) | struct menu
type expr (line 150) | struct expr
type property (line 178) | struct property
type prop_type (line 178) | enum prop_type
type expr (line 178) | struct expr
function menu_add_visibility (line 183) | void menu_add_visibility(struct expr *expr)
function menu_add_expr (line 189) | void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *...
function menu_add_symbol (line 194) | void menu_add_symbol(enum prop_type type, struct symbol *sym, struct exp...
function menu_add_option (line 199) | void menu_add_option(int token, char *arg)
function menu_validate_number (line 226) | static int menu_validate_number(struct symbol *sym, struct symbol *sym2)
function sym_check_prop (line 232) | static void sym_check_prop(struct symbol *sym)
function menu_finalize (line 282) | void menu_finalize(struct menu *parent)
function menu_has_prompt (line 446) | bool menu_has_prompt(struct menu *menu)
function menu_is_empty (line 458) | bool menu_is_empty(struct menu *menu)
function menu_is_visible (line 469) | bool menu_is_visible(struct menu *menu)
type menu (line 507) | struct menu
type menu (line 516) | struct menu
type menu (line 516) | struct menu
type menu (line 521) | struct menu
type menu (line 521) | struct menu
type prop_type (line 523) | enum prop_type
function menu_has_help (line 533) | bool menu_has_help(struct menu *menu)
type menu (line 538) | struct menu
function get_prompt_str (line 546) | static void get_prompt_str(struct gstr *r, struct property *prop,
type property (line 606) | struct property
type symbol (line 606) | struct symbol
type property (line 608) | struct property
function get_symbol_str (line 618) | void get_symbol_str(struct gstr *r, struct symbol *sym,
function get_relations_str (line 670) | struct gstr get_relations_str(struct symbol **sym_arr, struct list_head ...
function menu_get_ext_help (line 684) | void menu_get_ext_help(struct menu *menu, struct gstr *help)
FILE: kconfig/nconf.c
type mitem (line 247) | struct mitem {
type menu (line 257) | struct menu
type mitem (line 268) | struct mitem
type menu (line 277) | struct menu
type menu (line 278) | struct menu
type menu (line 279) | struct menu
type menu (line 282) | struct menu
type menu (line 287) | struct menu
type menu (line 288) | struct menu
type menu (line 289) | struct menu
type menu (line 290) | struct menu
type menu (line 291) | struct menu
type menu (line 292) | struct menu
type menu (line 293) | struct menu
type menu (line 294) | struct menu
type menu (line 295) | struct menu
type menu (line 296) | struct menu
type function_keys (line 298) | struct function_keys {
type function_keys (line 306) | struct function_keys
function print_function_line (line 363) | static void print_function_line(void)
function handle_f1 (line 386) | static void handle_f1(int *key, struct menu *current_item)
function handle_f2 (line 394) | static void handle_f2(int *key, struct menu *current_item)
function handle_f3 (line 401) | static void handle_f3(int *key, struct menu *current_item)
function handle_f4 (line 410) | static void handle_f4(int *key, struct menu *current_item)
function handle_f5 (line 426) | static void handle_f5(int *key, struct menu *current_item)
function handle_f6 (line 433) | static void handle_f6(int *key, struct menu *current_item)
function handle_f7 (line 440) | static void handle_f7(int *key, struct menu *current_item)
function handle_f8 (line 447) | static void handle_f8(int *key, struct menu *current_item)
function handle_f9 (line 454) | static void handle_f9(int *key, struct menu *current_item)
function process_special_keys (line 461) | static int process_special_keys(int *key, struct menu *menu)
function clean_items (line 481) | static void clean_items(void)
type match_f (line 491) | typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN,
function get_mext_match (line 495) | static int get_mext_match(const char *match_str, match_f flag)
function item_make (line 523) | static void item_make(struct menu *menu, char tag, const char *fmt, ...)
function item_add_str (line 563) | static void item_add_str(const char *fmt, ...)
function item_tag (line 591) | static char item_tag(void)
function curses_item_index (line 603) | static int curses_item_index(void)
type mitem (line 611) | struct mitem
type mitem (line 616) | struct mitem
function item_is_tag (line 621) | static int item_is_tag(char tag)
function do_exit (line 646) | static int do_exit(void)
function search_conf (line 689) | static void search_conf(void)
function build_conf (line 733) | static void build_conf(struct menu *menu)
function reset_menu (line 919) | static void reset_menu(void)
function center_item (line 927) | static void center_item(int selected_index, int *last_top_row)
function show_menu (line 948) | static void show_menu(const char *prompt, const char *instructions,
function adj_match_dir (line 997) | static void adj_match_dir(match_f *match_direction)
type match_state (line 1008) | struct match_state
function do_match (line 1019) | static int do_match(int key, struct match_state *state, int *ans)
function conf (line 1066) | static void conf(struct menu *menu)
function conf_message_callback (line 1211) | static void conf_message_callback(const char *fmt, va_list ap)
function show_help (line 1219) | static void show_help(struct menu *menu)
function conf_choice (line 1232) | static void conf_choice(struct menu *menu)
function conf_string (line 1349) | static void conf_string(struct menu *menu)
function conf_load (line 1393) | static void conf_load(void)
function conf_save (line 1424) | static void conf_save(void)
function setup_windows (line 1457) | void setup_windows(void)
function main (line 1476) | int main(int ac, char **av)
FILE: kconfig/nconf.gui.c
function set_normal_colors (line 23) | static void set_normal_colors(void)
function normal_color_theme (line 68) | static void normal_color_theme(void)
function no_colors_theme (line 100) | static void no_colors_theme(void)
function set_colors (line 132) | void set_colors()
function print_in_middle (line 147) | void print_in_middle(WINDOW *win,
function get_line_no (line 175) | int get_line_no(const char *text)
function get_line_length (line 203) | int get_line_length(const char *line)
function fill_window (line 214) | void fill_window(WINDOW *win, const char *text)
function btn_dialog (line 241) | int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...)
function dialog_inputbox (line 357) | int dialog_inputbox(WINDOW *main_window,
function refresh_all_windows (line 534) | void refresh_all_windows(WINDOW *main_window)
function show_scroll_win (line 542) | void show_scroll_win(WINDOW *main_window,
FILE: kconfig/nconf.h
type attributes_t (line 39) | typedef enum {
type function_key (line 64) | typedef enum {
FILE: kconfig/qconf.cc
function QString (line 62) | static inline QString qgettext(const char* str)
function QString (line 67) | static inline QString qgettext(const QString& str)
type symbol (line 123) | struct symbol
type property (line 124) | struct property
type optionMode (line 361) | enum optionMode
type menu (line 373) | struct menu
function ConfigItem (line 417) | ConfigItem* ConfigList::findConfigItem(struct menu *menu)
type menu (line 431) | struct menu
type prop_type (line 432) | enum prop_type
type symbol (line 492) | struct symbol
type symbol (line 517) | struct symbol
type menu (line 518) | struct menu
type menu (line 557) | struct menu
type prop_type (line 559) | enum prop_type
type menu (line 576) | struct menu
type menu (line 601) | struct menu
type menu (line 603) | struct menu
type prop_type (line 607) | enum prop_type
type menu (line 667) | struct menu
type prop_type (line 668) | enum prop_type
type menu (line 728) | struct menu
type prop_type (line 729) | enum prop_type
type menu (line 790) | struct menu
type prop_type (line 791) | enum prop_type
type menu (line 815) | struct menu
type menu (line 988) | struct menu
type symbol (line 1018) | struct symbol
type gstr (line 1050) | struct gstr
function QString (line 1072) | QString ConfigInfoView::debug_info(struct symbol *sym)
function QString (line 1126) | QString ConfigInfoView::print_filter(const QString &str)
type symbol (line 1157) | struct symbol
function Q3PopupMenu (line 1170) | Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos)
type menu (line 1439) | struct menu
type menu (line 1440) | struct menu
type menu (line 1441) | struct menu
type menu (line 1442) | struct menu
type menu (line 1445) | struct menu
type menu (line 1446) | struct menu
type menu (line 1447) | struct menu
type menu (line 1448) | struct menu
type menu (line 1450) | struct menu
type menu (line 1451) | struct menu
type menu (line 1452) | struct menu
type menu (line 1453) | struct menu
type menu (line 1454) | struct menu
type menu (line 1456) | struct menu
type menu (line 1457) | struct menu
type menu (line 1511) | struct menu
type menu (line 1520) | struct menu
type menu (line 1522) | struct menu
function fixup_rootmenu (line 1729) | void fixup_rootmenu(struct menu *menu)
function usage (line 1747) | static void usage(void)
function main (line 1753) | int main(int ac, char** av)
FILE: kconfig/qconf.h
function class (line 33) | class ConfigSettings : public QSettings {
type colIdx (line 40) | enum colIdx {
type listMode (line 43) | enum listMode {
type optionMode (line 46) | enum optionMode {
function class (line 50) | class ConfigList : public Q3ListView {
function class (line 144) | class ConfigItem : public Q3ListViewItem {
function class (line 203) | class ConfigLineEdit : public QLineEdit {
function class (line 219) | class ConfigView : public Q3VBox {
function class (line 252) | class ConfigInfoView : public Q3TextBrowser {
function class (line 282) | class ConfigSearchWindow : public QDialog {
function class (line 302) | class ConfigMainWindow : public Q3MainWindow {
FILE: kconfig/symbol.c
type symbol (line 14) | struct symbol
type symbol (line 32) | struct symbol
type symbol (line 33) | struct symbol
type expr (line 36) | struct expr
function sym_add_default (line 38) | static void sym_add_default(struct symbol *sym, const char *def)
function sym_init (line 45) | void sym_init(void)
function sym_get_type (line 63) | enum symbol_type sym_get_type(struct symbol *sym)
type symbol_type (line 76) | enum symbol_type
type property (line 97) | struct property
type symbol (line 97) | struct symbol
type property (line 99) | struct property
type property (line 106) | struct property
type symbol (line 106) | struct symbol
type property (line 108) | struct property
type property (line 115) | struct property
type symbol (line 115) | struct symbol
type property (line 117) | struct property
type property (line 127) | struct property
type symbol (line 127) | struct symbol
type property (line 129) | struct property
function sym_get_range_val (line 139) | static long long sym_get_range_val(struct symbol *sym, int base)
function sym_validate_range (line 155) | static void sym_validate_range(struct symbol *sym)
function sym_calc_visibility (line 189) | static void sym_calc_visibility(struct symbol *sym)
type symbol (line 235) | struct symbol
type symbol (line 235) | struct symbol
type symbol (line 237) | struct symbol
type property (line 238) | struct property
type expr (line 239) | struct expr
type symbol (line 261) | struct symbol
type symbol (line 261) | struct symbol
type symbol (line 263) | struct symbol
type property (line 264) | struct property
type expr (line 265) | struct expr
function sym_calc_value (line 293) | void sym_calc_value(struct symbol *sym)
function sym_clear_all_valid (line 442) | void sym_clear_all_valid(void)
function sym_set_changed (line 454) | void sym_set_changed(struct symbol *sym)
function sym_set_all_changed (line 465) | void sym_set_all_changed(void)
function sym_tristate_within_range (line 474) | bool sym_tristate_within_range(struct symbol *sym, tristate val)
function sym_set_tristate_value (line 493) | bool sym_set_tristate_value(struct symbol *sym, tristate val)
function tristate (line 529) | tristate sym_toggle_tristate_value(struct symbol *sym)
function sym_string_valid (line 552) | bool sym_string_valid(struct symbol *sym, const char *str)
function sym_string_within_range (line 595) | bool sym_string_within_range(struct symbol *sym, const char *str)
function sym_set_string_value (line 637) | bool sym_set_string_value(struct symbol *sym, const char *newval)
type symbol (line 693) | struct symbol
type property (line 695) | struct property
type symbol (line 696) | struct symbol
type symbol (line 760) | struct symbol
function sym_is_changable (line 784) | bool sym_is_changable(struct symbol *sym)
function strhash (line 789) | static unsigned strhash(const char *s)
type symbol (line 798) | struct symbol
type symbol (line 800) | struct symbol
type symbol (line 839) | struct symbol
type symbol (line 841) | struct symbol
type symbol (line 884) | struct symbol
type sym_match (line 958) | struct sym_match {
function sym_rel_comp (line 967) | static int sym_rel_comp(const void *sym1, const void *sym2)
type symbol (line 993) | struct symbol
type symbol (line 995) | struct symbol
type sym_match (line 996) | struct sym_match
type sym_match (line 1016) | struct sym_match
type sym_match (line 1030) | struct sym_match
type symbol (line 1031) | struct symbol
type dep_stack (line 1052) | struct dep_stack {
function dep_stack_insert (line 1059) | static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym)
function dep_stack_remove (line 1069) | static void dep_stack_remove(void)
function sym_check_print_recursive (line 1081) | static void sym_check_print_recursive(struct symbol *last_sym)
type symbol (line 1153) | struct symbol
type expr (line 1153) | struct expr
type symbol (line 1155) | struct symbol
type symbol (line 1184) | struct symbol
type symbol (line 1184) | struct symbol
type symbol (line 1186) | struct symbol
type property (line 1187) | struct property
type dep_stack (line 1188) | struct dep_stack
type symbol (line 1218) | struct symbol
type symbol (line 1218) | struct symbol
type symbol (line 1220) | struct symbol
type property (line 1221) | struct property
type expr (line 1222) | struct expr
type dep_stack (line 1223) | struct dep_stack
type symbol (line 1255) | struct symbol
type symbol (line 1255) | struct symbol
type symbol (line 1257) | struct symbol
type property (line 1258) | struct property
type dep_stack (line 1268) | struct dep_stack
type property (line 1289) | struct property
type prop_type (line 1289) | enum prop_type
type symbol (line 1289) | struct symbol
type property (line 1291) | struct property
type property (line 1292) | struct property
type symbol (line 1311) | struct symbol
type property (line 1311) | struct property
type prop_type (line 1319) | enum prop_type
function prop_add_env (line 1346) | static void prop_add_env(const char *env)
FILE: kconfig/util.c
type file (line 14) | struct file
type file (line 16) | struct file
function file_write_dep (line 35) | int file_write_dep(const char *name)
function str_new (line 81) | struct gstr str_new(void)
function str_assign (line 92) | struct gstr str_assign(const char *s)
function str_free (line 102) | void str_free(struct gstr *gs)
function str_append (line 111) | void str_append(struct gstr *gs, const char *s)
function str_printf (line 125) | void str_printf(struct gstr *gs, const char *fmt, ...)
type gstr (line 136) | struct gstr
FILE: kernel/adc.h
type adc_config (line 6) | struct adc_config {
type adc_config (line 18) | struct adc_config
FILE: kernel/bflt.c
function short_be (line 31) | static inline uint16_t short_be(uint16_t le)
function long_be (line 36) | static inline uint32_t long_be(uint32_t le)
function load_header (line 48) | static void load_header(struct flat_hdr * to_hdr, struct flat_hdr * from...
function check_header (line 52) | static int check_header(struct flat_hdr * header) {
function process_got_relocs (line 82) | static int process_got_relocs(struct flat_hdr * hdr, uint8_t * base, uin...
function process_relocs (line 118) | int process_relocs(struct flat_hdr * hdr, unsigned long * base, unsigned...
function bflt_load (line 214) | int bflt_load(uint8_t* from, void **reloc_text, void **reloc_data, void ...
FILE: kernel/cdc_acm.h
type cdcacm_addr (line 5) | struct cdcacm_addr {
type fnode (line 10) | struct fnode
type cdcacm_addr (line 10) | struct cdcacm_addr
FILE: kernel/cirbuf.c
type cirbuf (line 25) | struct cirbuf {
type cirbuf (line 32) | struct cirbuf
type cirbuf (line 34) | struct cirbuf
type cirbuf (line 38) | struct cirbuf
function cirbuf_writebyte (line 56) | int cirbuf_writebyte(struct cirbuf *cb, uint8_t byte)
function cirbuf_readbyte (line 76) | int cirbuf_readbyte(struct cirbuf *cb, uint8_t *byte)
function cirbuf_readbytes (line 94) | int cirbuf_readbytes(struct cirbuf *cb, void *bytes, int len)
function cirbuf_writebytes (line 119) | int cirbuf_writebytes(struct cirbuf *cb, const uint8_t * bytes, int len)
function cirbuf_bytesfree (line 155) | int cirbuf_bytesfree(struct cirbuf *cb)
function cirbuf_bytesinuse (line 168) | int cirbuf_bytesinuse(struct cirbuf *cb)
FILE: kernel/cirbuf.h
type cirbuf (line 6) | struct cirbuf
type cirbuf (line 8) | struct cirbuf
type cirbuf (line 10) | struct cirbuf
type cirbuf (line 12) | struct cirbuf
type cirbuf (line 14) | struct cirbuf
type cirbuf (line 17) | struct cirbuf
type cirbuf (line 18) | struct cirbuf
type cirbuf (line 19) | struct cirbuf
FILE: kernel/crypto/aes.c
function wc_AesSetIV (line 702) | static int wc_AesSetIV(Aes *aes, const byte *iv)
function wc_AesSetKeyLocal (line 715) | static int wc_AesSetKeyLocal(Aes *aes, const byte *userKey, word32 keylen,
function wc_AesSetKey (line 801) | int wc_AesSetKey(Aes *aes, const byte *userKey, word32 keylen, const byt...
function wc_AesEncrypt (line 816) | static void wc_AesEncrypt(Aes *aes, const byte *inBlock, byte *outBlock)
function wc_AesDecrypt (line 950) | static void wc_AesDecrypt(Aes *aes, const byte *inBlock, byte *outBlock)
function wc_AesCbcEncrypt (line 1082) | int wc_AesCbcEncrypt(Aes *aes, byte *out, const byte *in, word32 sz)
function wc_AesCbcDecrypt (line 1098) | int wc_AesCbcDecrypt(Aes *aes, byte *out, const byte *in, word32 sz)
FILE: kernel/crypto/aes.h
type Aes (line 13) | typedef struct Aes {
FILE: kernel/crypto/misc.c
function word32 (line 25) | word32 rotlFixed(word32 x, word32 y)
function word32 (line 30) | word32 rotrFixed(word32 x, word32 y)
function word32 (line 35) | word32 ByteReverseWord32(word32 value)
function ByteReverseWords (line 42) | void ByteReverseWords(word32 *out, const word32 *in, word32 byte_count)
function XorWords (line 50) | static void XorWords(word32 *r, const word32 *a, word32 n)
function xorbuf (line 57) | void xorbuf(void *buf, const void *mask, word32 count)
FILE: kernel/crypto/misc.h
type byte (line 10) | typedef unsigned char byte;
type word16 (line 13) | typedef unsigned short word16;
type word32 (line 14) | typedef unsigned int word32;
FILE: kernel/crypto/sha256.c
function word32 (line 26) | static inline word32 min(word32 a, word32 b)
function Transform (line 63) | static int Transform(Sha256 *sha256)
function AddLength (line 107) | static inline void AddLength(Sha256 *sha256, word32 len)
function wc_InitSha256 (line 114) | int wc_InitSha256(Sha256 *sha256)
function wc_Sha256Update (line 133) | int wc_Sha256Update(Sha256 *sha256, const byte *data, word32 len)
function wc_Sha256Final (line 163) | int wc_Sha256Final(Sha256 *sha256, byte *hash)
FILE: kernel/crypto/sha256.h
type Sha256 (line 15) | typedef struct Sha256 {
FILE: kernel/device.h
type device (line 6) | struct device {
type device (line 13) | struct device
type module (line 13) | struct module
type fnode (line 13) | struct fnode
FILE: kernel/drivers/device.c
function device_open (line 24) | int device_open(const char *path, int flags)
type device (line 32) | struct device
type module (line 32) | struct module
type fnode (line 32) | struct fnode
type device (line 34) | struct device
type device (line 34) | struct device
FILE: kernel/drivers/devusb_cdc_ecm.c
type pico_dev_usbeth (line 31) | struct pico_dev_usbeth {
type usbeth_rx_buffer (line 35) | struct usbeth_rx_buffer {
type usbeth_tx_buffer (line 46) | struct usbeth_tx_buffer {
type pico_dev_usbeth (line 57) | struct pico_dev_usbeth
type usbeth_rx_buffer (line 58) | struct usbeth_rx_buffer
type usbeth_tx_buffer (line 59) | struct usbeth_tx_buffer
type usb_config_descriptor (line 62) | struct usb_config_descriptor
type usb_interface_descriptor (line 64) | struct usb_interface_descriptor
type usb_cdc_header_descriptor (line 66) | struct usb_cdc_header_descriptor
type usb_cdc_union_descriptor (line 67) | struct usb_cdc_union_descriptor
type usb_cdc_ecm_descriptor (line 68) | struct usb_cdc_ecm_descriptor
type usb_endpoint_descriptor (line 70) | struct usb_endpoint_descriptor
type usb_interface_descriptor (line 72) | struct usb_interface_descriptor
type usb_endpoint_descriptor (line 73) | struct usb_endpoint_descriptor
type usb_cdc_header_descriptor (line 100) | struct usb_cdc_header_descriptor
type usb_cdc_union_descriptor (line 106) | struct usb_cdc_union_descriptor
type usb_cdc_ecm_descriptor (line 113) | struct usb_cdc_ecm_descriptor
type usb_string_descriptor (line 163) | struct usb_string_descriptor
type usb_string_descriptor (line 171) | struct usb_string_descriptor
type usb_string_descriptor (line 182) | struct usb_string_descriptor
type usb_string_descriptor (line 193) | struct usb_string_descriptor
type usb_string_descriptor (line 202) | struct usb_string_descriptor
type usb_string_descriptor (line 212) | struct usb_string_descriptor
type usb_string_descriptor (line 213) | struct usb_string_descriptor
type usbd_info_string (line 221) | struct usbd_info_string
type usb_device_descriptor (line 227) | struct usb_device_descriptor
type usbd_info (line 244) | struct usbd_info
type usb_config_descriptor (line 251) | struct usb_config_descriptor
function cdcecm_setup_request (line 258) | static void cdcecm_setup_request(usbd_device *usbd_dev, uint8_t ep_addr,
type usb_config_descriptor (line 307) | struct usb_config_descriptor
function notify_link_up (line 311) | static void notify_link_up(void)
function bulk_out_callback (line 329) | static void bulk_out_callback(usbd_device *dev,
function bulk_out_submit (line 357) | static void bulk_out_submit(void)
function cdcecm_set_config (line 377) | static void cdcecm_set_config(usbd_device *usbd_dev,
function bulk_in_callback (line 392) | static void bulk_in_callback(usbd_device *dev,
function pico_usbeth_send (line 404) | static int pico_usbeth_send(struct pico_device *dev, void *buf, int len)
function pico_usbeth_poll (line 434) | static int pico_usbeth_poll(struct pico_device *dev, int loop_score)
function pico_usbeth_destroy (line 444) | static void pico_usbeth_destroy(struct pico_device *dev)
function usb_ethernet_init (line 455) | int usb_ethernet_init(unsigned int dev)
FILE: kernel/drivers/dma.h
type dma_config (line 4) | struct dma_config {
type dma_config (line 16) | struct dma_config
FILE: kernel/drivers/eth.h
type eth_config (line 6) | struct eth_config {
type eth_config (line 14) | struct eth_config
FILE: kernel/drivers/exti.c
type dev_exti (line 34) | struct dev_exti {
type dev_exti (line 45) | struct dev_exti
function exti_isr (line 47) | void exti_isr(uint32_t exti_base, uint32_t exti_idx)
function exti0_isr (line 56) | void exti0_isr(void)
function exti1_isr (line 61) | void exti1_isr(void)
function exti2_isr (line 66) | void exti2_isr(void)
function exti3_isr (line 71) | void exti3_isr(void)
function exti4_isr (line 76) | void exti4_isr(void)
function exti9_5_isr (line 81) | void exti9_5_isr(void)
function exti15_10_isr (line 95) | void exti15_10_isr(void)
function exti_base (line 111) | static uint32_t exti_base(uint16_t pin)
function gpio_id (line 152) | static int gpio_id(uint16_t pin)
function exti_register (line 192) | int exti_register(uint32_t base, uint16_t pin, uint8_t trigger, void (*i...
function exti_unregister (line 220) | void exti_unregister(int idx)
function exti_enable (line 228) | int exti_enable(int idx, int enable)
function exti_init (line 240) | void exti_init(void)
FILE: kernel/drivers/fbcon.c
type dev_fbcon (line 33) | struct dev_fbcon {
type fnode (line 46) | struct fnode
type fnode (line 47) | struct fnode
type fnode (line 48) | struct fnode
type fnode (line 49) | struct fnode
type fnode (line 50) | struct fnode
type module (line 55) | struct module
function devfbcon_tty_attach (line 67) | static void devfbcon_tty_attach(struct fnode *fno, int pid)
function render_row (line 76) | static void render_row(struct dev_fbcon *fbcon, int row)
function render_screen (line 99) | static void render_screen(struct dev_fbcon *fbcon)
function scroll (line 106) | static void scroll(struct dev_fbcon *fbcon)
function devfbcon_write (line 126) | static int devfbcon_write(struct fnode *fno, const void *buf, unsigned i...
function devfbcon_read (line 220) | static int devfbcon_read(struct fnode *fno, void *buf, unsigned int len)
function devfbcon_poll (line 226) | static int devfbcon_poll(struct fnode *fno, uint16_t events, uint16_t *r...
function devfbcon_seek (line 231) | static int devfbcon_seek(struct fnode *fno, int off, int whence)
function fbcon_init (line 266) | int fbcon_init(uint32_t cols, uint32_t rows)
FILE: kernel/drivers/fortuna.c
type fortuna_counter (line 36) | struct fortuna_counter {
type fortuna_generator_state (line 42) | struct fortuna_generator_state {
type fortuna_generator_state (line 54) | struct fortuna_generator_state
function fortuna_init_counter (line 61) | static inline void fortuna_init_counter(struct fortuna_counter *counter) {
function fortuna_increment_counter (line 71) | static inline void fortuna_increment_counter(struct fortuna_counter *cou...
function fortuna_counter_is_zero (line 88) | static int fortuna_counter_is_zero(struct fortuna_counter *counter) {
function fortuna_extract_seed (line 104) | static int fortuna_extract_seed(uint8_t *seed_buffer, int buffer_size)
function fortuna_reseed (line 127) | static int fortuna_reseed(uint8_t *seed, uint8_t seed_size)
function fortuna_generate_block (line 153) | static int fortuna_generate_block(uint8_t *buffer, int buffer_size)
function fortuna_init (line 178) | int fortuna_init(void)
function fortuna_accu (line 207) | void fortuna_accu(int source, int pool, uint8_t *data, int data_size)
function fortuna_get_bytes (line 217) | int fortuna_get_bytes(uint8_t *buffer, int count)
function fortuna_shutdown (line 270) | void fortuna_shutdown(void)
FILE: kernel/drivers/framebuffer.h
type fb_ops (line 8) | struct fb_ops
type fb_info (line 11) | struct fb_info {
type fb_ops (line 22) | struct fb_ops {
type fb_info (line 63) | struct fb_info
FILE: kernel/drivers/frand.c
type frand_info (line 37) | struct frand_info
type fnode (line 40) | struct fnode
type module (line 42) | struct module
function frand_open (line 49) | static int frand_open(const char *path, int flags)
function frand_read (line 59) | static int frand_read(struct fnode *fno, void *buf, unsigned int len)
function frand_fno_init (line 81) | static int frand_fno_init(struct fnode *dev, struct frand_info *frand)
function frand_init (line 96) | void frand_init(struct fnode *dev)
function register_frand (line 103) | int register_frand(struct frand_info *frand_info)
FILE: kernel/drivers/ft5336.c
type dev_ts (line 54) | struct dev_ts {
function ft5336_read (line 64) | int ft5336_read(struct fnode *fno, void *buf, unsigned int len)
type module (line 69) | struct module
function ft5336_task (line 77) | static void ft5336_task(void *arg)
function ft5336_init (line 91) | int ft5336_init(uint32_t bus)
FILE: kernel/drivers/gpio.c
function ARCH_GPIO_BASE (line 36) | static inline uint32_t ARCH_GPIO_BASE(int x)
function ARCH_GPIO_BASE (line 82) | static inline uint32_t ARCH_GPIO_BASE(int x)
function exti_register (line 92) | int exti_register(uint32_t base, uint16_t pin, uint8_t trigger, void (*i...
function exti_unregister (line 95) | void exti_unregister(int pin) {
function exti_enable (line 98) | int exti_enable(int idx, int enable) {
function exti_init (line 101) | void exti_init(void) {
function ARCH_GPIO_BASE (line 111) | static inline uint32_t ARCH_GPIO_BASE(int x)
type dev_gpio (line 175) | struct dev_gpio
type dev_gpio (line 176) | struct dev_gpio
function gpio_list_add (line 178) | static void gpio_list_add(struct dev_gpio *pio)
type dev_gpio (line 190) | struct dev_gpio
type dev_gpio (line 192) | struct dev_gpio
function gpio_list_del (line 201) | static void gpio_list_del(struct dev_gpio *old)
function gpio_list_len (line 220) | int gpio_list_len(void)
type fnode (line 232) | struct fnode
type fnode (line 233) | struct fnode
type fnode (line 234) | struct fnode
type fnode (line 235) | struct fnode
type fnode (line 236) | struct fnode
type fnode (line 238) | struct fnode
type module (line 240) | struct module
type module (line 251) | struct module
function eint_isr (line 317) | void eint_isr(uint32_t exti_base)
function eint0_isr (line 322) | void eint0_isr(void)
function eint1_isr (line 326) | void eint1_isr(void)
function eint2_isr (line 330) | void eint2_isr(void)
function eint3_isr (line 334) | void eint3_isr(void)
function gpio_isr (line 342) | static void gpio_isr(void *arg)
function gpio_set_trigger (line 352) | static int gpio_set_trigger(struct dev_gpio *gpio, uint32_t trigger)
function devgpiomx_ioctl (line 371) | static int devgpiomx_ioctl(struct fnode * fno, const uint32_t cmd, void ...
function devgpio_write (line 401) | static int devgpio_write(struct fnode * fno, const void *buf, unsigned i...
function devgpio_ioctl (line 421) | static int devgpio_ioctl(struct fnode * fno, const uint32_t cmd, void *arg)
function devgpio_read (line 471) | static int devgpio_read(struct fnode * fno, void *buf, unsigned int len)
function devgpio_poll (line 515) | static int devgpio_poll(struct fnode * fno, uint16_t events, uint16_t *r...
function gpio_fno_init (line 549) | static void gpio_fno_init(struct dev_gpio *g, const char *name)
function gpio_create (line 584) | int gpio_create(struct module *mod, const struct gpio_config *gpio_config)
function gpio_init (line 643) | int gpio_init(void)
function devgpio_close (line 657) | static int devgpio_close(struct fnode *fno)
FILE: kernel/drivers/gpio.h
type gpio_config (line 13) | struct gpio_config {
type dev_gpio (line 32) | struct dev_gpio {
type dev_gpio (line 48) | struct dev_gpio
type module (line 52) | struct module
type gpio_config (line 52) | struct gpio_config
FILE: kernel/drivers/i2c.h
type i2c_config (line 7) | struct i2c_config {
type i2c_slave (line 25) | struct i2c_slave {
type i2c_config (line 33) | struct i2c_config
type i2c_slave (line 34) | struct i2c_slave
type i2c_slave (line 35) | struct i2c_slave
type i2c_slave (line 36) | struct i2c_slave
type i2c_slave (line 37) | struct i2c_slave
FILE: kernel/drivers/ili9341.c
type fb_info (line 36) | struct fb_info
type dev_ili9341 (line 38) | struct dev_ili9341 {
type ili0341_ctrl_reg (line 44) | struct ili0341_ctrl_reg
type dev_ili9341 (line 50) | struct dev_ili9341
type module (line 53) | struct module
function ili9341_write (line 59) | static void ili9341_write(uint8_t data)
function ltdc_destroy (line 72) | static void ltdc_destroy(struct fb_info *fb)
function ltdc_config_layer (line 80) | static int ltdc_config_layer(struct fb_info *fb)
function ltdc_config (line 164) | static void ltdc_config(void)
function ltdc_clock (line 186) | static void ltdc_clock(void)
function ltdc_blank (line 231) | static int ltdc_blank(struct fb_info *fb)
function ltdc_screen_on (line 237) | static void ltdc_screen_on(void)
function ltdc_enable_clut (line 245) | void ltdc_enable_clut(void)
function ltdc_config_clut (line 255) | void ltdc_config_clut(uint32_t *CLUT, uint32_t size)
function ltdc_set_cmap (line 267) | int ltdc_set_cmap(uint32_t *cmap, struct fb_info *info)
function ltdc_open (line 275) | static int ltdc_open(struct fb_info *info)
type fb_ops (line 280) | struct fb_ops
type fb_info (line 286) | struct fb_info
type fb_ops (line 287) | struct fb_ops
function lcd_pinmux (line 291) | static void lcd_pinmux(void)
function lcd_command (line 476) | static void
type tft_command (line 674) | struct tft_command {
type tft_command (line 701) | struct tft_command
function initialize_display (line 716) | static void
type gpio_config (line 731) | struct gpio_config
function ili9341_init (line 739) | static void ili9341_init(void)
function ltdc_init (line 757) | void ltdc_init(void)
FILE: kernel/drivers/l3gd20.c
type L3GD20_MODE (line 32) | typedef enum
type dev_l3gd20 (line 41) | struct dev_l3gd20 {
type l3gd20_ctrl_reg (line 50) | struct l3gd20_ctrl_reg
type dev_l3gd20 (line 59) | struct dev_l3gd20
type fnode (line 62) | struct fnode
type fnode (line 63) | struct fnode
type fnode (line 64) | struct fnode
type module (line 66) | struct module
function completion (line 75) | static void completion(void * arg)
function int1_callback (line 83) | static void int1_callback(void *arg)
function int2_callback (line 89) | static void int2_callback(void *arg)
function devl3gd20_ioctl (line 99) | static int devl3gd20_ioctl(struct fnode * fno, const uint32_t cmd, void ...
function devl3gd20_read (line 143) | static int devl3gd20_read(struct fnode *fno, void *buf, unsigned int len)
function devl3gd20_close (line 195) | static int devl3gd20_close(struct fnode *fno)
function l3gd20_fno_init (line 207) | static void l3gd20_fno_init(struct fnode *dev, uint32_t n, const struct ...
function l3gd20_init (line 219) | void l3gd20_init(struct fnode * dev, const struct l3gd20_addr l3gd20_addr)
FILE: kernel/drivers/l3gd20.h
type l3gd20_addr (line 4) | struct l3gd20_addr {
type fnode (line 15) | struct fnode
type l3gd20_addr (line 15) | struct l3gd20_addr
FILE: kernel/drivers/lis3dsh.c
type dev_lis3dsh (line 77) | struct dev_lis3dsh {
type lis3dsh_ctrl_reg (line 83) | struct lis3dsh_ctrl_reg
type dev_lis3dsh (line 89) | struct dev_lis3dsh
type fnode (line 92) | struct fnode
type fnode (line 93) | struct fnode
type module (line 95) | struct module
function lis3dsh_write_reg (line 105) | static void lis3dsh_write_reg(int reg, int data)
function lis3dsh_read_reg (line 117) | static int lis3dsh_read_reg(int reg)
function devlis3dsh_open (line 129) | static int devlis3dsh_open(const char *path, int flags)
function devlis3dsh_read (line 154) | static int devlis3dsh_read(struct fnode *fno, void *buf, unsigned int len)
function devlis3dsh_close (line 171) | static int devlis3dsh_close(struct fnode *fno)
function lis3dsh_isr (line 181) | static void lis3dsh_isr(struct spi_slave *sl)
function lis3dsh_init (line 188) | int lis3dsh_init(uint8_t bus, const struct gpio_config *lis3dsh_cs)
FILE: kernel/drivers/lis3dsh.h
type gpio_config (line 4) | struct gpio_config
FILE: kernel/drivers/lm3s_eth.c
type dev_eth (line 51) | struct dev_eth {
type module (line 59) | struct module
type dev_eth (line 64) | struct dev_eth
function eth_poll (line 69) | static int eth_poll(struct pico_device *dev, int loop_score)
function eth_send (line 81) | static int eth_send(struct pico_device *dev, void * buf, int len)
function pico_eth_start (line 89) | int pico_eth_start(void)
function eth_isr (line 128) | void eth_isr(void)
function ethernet_init (line 135) | int ethernet_init(const struct eth_config *conf)
FILE: kernel/drivers/lsm303dlhc.c
type lsm303_state (line 35) | enum lsm303_state {
type dev_lsm303dlhc (line 42) | struct dev_lsm303dlhc {
type fnode (line 56) | struct fnode
type fnode (line 57) | struct fnode
type module (line 59) | struct module
function isr_tx (line 69) | static void isr_tx(struct i2c_slave * arg)
function isr_rx (line 83) | static void isr_rx(struct i2c_slave * arg)
function int1_callback (line 92) | static void int1_callback(void *arg)
function int2_callback (line 97) | static void int2_callback(void *arg)
function drdy_callback (line 102) | static void drdy_callback(void *arg)
function devlsm303dlhc_read (line 111) | static int devlsm303dlhc_read(struct fnode *fno, void *buf, unsigned int...
function devlsm303dlhc_close (line 145) | static int devlsm303dlhc_close(struct fnode *fno)
function lsm303dlhc_init (line 154) | int lsm303dlhc_init(int bus)
FILE: kernel/drivers/lsm303dlhc.h
type lsm303dlhc_addr (line 4) | struct lsm303dlhc_addr {
FILE: kernel/drivers/mccog21.c
type dev_disp (line 65) | struct dev_disp {
function mccog21_clear (line 73) | static void mccog21_clear(void)
function mccog21_read (line 85) | int mccog21_read(struct fnode *fno, void *buf, unsigned int len)
function mccog21_write (line 94) | int mccog21_write(struct fnode *fno, const void *buf, unsigned int len)
type module (line 106) | struct module
function mccog21_task (line 117) | static void mccog21_task(void *arg)
function mccog21_init (line 205) | int mccog21_init(uint32_t bus)
FILE: kernel/drivers/null.c
type fnode (line 24) | struct fnode
type fnode (line 25) | struct fnode
function devnull_read (line 28) | static int devnull_read(struct fnode *fno, void *buf, unsigned int len)
function devnull_write (line 39) | static int devnull_write(struct fnode *fno, const void *buf, unsigned in...
function devnull_poll (line 48) | static int devnull_poll(struct fnode *fno, uint16_t events, uint16_t *re...
function devnull_open (line 53) | static int devnull_open(const char *path, int flags)
type module (line 62) | struct module
function devnull_init (line 66) | void devnull_init(struct fnode *dev)
FILE: kernel/drivers/pty.c
type devptmx (line 30) | struct devptmx {
type devpty (line 38) | struct devpty {
type devpts (line 47) | struct devpts {
type fnode (line 57) | struct fnode
type fnode (line 58) | struct fnode
type fnode (line 59) | struct fnode
type fnode (line 60) | struct fnode
type fnode (line 61) | struct fnode
type fnode (line 62) | struct fnode
type fnode (line 63) | struct fnode
type fnode (line 64) | struct fnode
type fnode (line 65) | struct fnode
type fnode (line 66) | struct fnode
type module (line 68) | struct module
type module (line 74) | struct module
type module (line 86) | struct module
function pts_create (line 96) | static int pts_create(void)
function ptmx_create (line 135) | static void ptmx_create(void)
function ptmx_init (line 147) | int ptmx_init(void)
function pty_open (line 153) | int pty_open(const char *path, int flags)
function ptmx_open (line 158) | int ptmx_open(const char *path, int flags)
function pty_read (line 167) | static int pty_read(struct fnode *fno, void *buf, unsigned int len)
function pty_write (line 195) | static int pty_write(struct fnode *fno, const void *buf, unsigned int len)
function pty_poll (line 221) | static int pty_poll(struct fnode *fno, uint16_t events, uint16_t *revents)
function pty_tty_attach (line 254) | static void pty_tty_attach(struct fnode *fno, int pid)
function pty_close (line 265) | static int pty_close(struct fnode *fno)
function pts_open (line 291) | int pts_open(const char *path, int flags)
function pts_read (line 300) | static int pts_read(struct fnode *fno, void *buf, unsigned int len)
function pts_write (line 330) | static int pts_write(struct fnode *fno, const void *buf, unsigned int len)
function pts_poll (line 358) | static int pts_poll(struct fnode *fno, uint16_t events, uint16_t *revents)
function pts_tty_attach (line 391) | static void pts_tty_attach(struct fnode *fno, int pid)
function sys_ptsname_hdlr (line 401) | int sys_ptsname_hdlr(int fd, char *buf, size_t buflen)
FILE: kernel/drivers/sdio.h
type sdio_config (line 6) | struct sdio_config {
type sdio_config (line 22) | struct sdio_config
FILE: kernel/drivers/socket_in.c
type module (line 10) | struct module
type frosted_inet_socket (line 12) | struct frosted_inet_socket {
function sock_check_fd (line 26) | static int sock_check_fd(int fd, struct fnode **fno)
function sock_poll (line 41) | static int sock_poll(struct fnode *f, uint16_t events, uint16_t *revents)
type frosted_inet_socket (line 72) | struct frosted_inet_socket
type fnode (line 74) | struct fnode
type frosted_inet_socket (line 75) | struct frosted_inet_socket
type frosted_inet_socket (line 79) | struct frosted_inet_socket
type frosted_inet_socket (line 83) | struct frosted_inet_socket
type pico_socket (line 83) | struct pico_socket
type frosted_inet_socket (line 87) | struct frosted_inet_socket
function pico_socket_event (line 90) | static void pico_socket_event(uint16_t ev, struct pico_socket *sock)
function sock_close (line 104) | static int sock_close(struct fnode *fno)
type frosted_inet_socket (line 134) | struct frosted_inet_socket
type frosted_inet_socket (line 136) | struct frosted_inet_socket
type frosted_inet_socket (line 137) | struct frosted_inet_socket
type fnode (line 140) | struct fnode
function sock_socket (line 149) | static int sock_socket(int domain, int type_flags, int protocol)
function sock_recvfrom (line 207) | static int sock_recvfrom(int fd, void *buf, unsigned int len, int flags,...
function sock_sendto (line 272) | static int sock_sendto(int fd, const void *buf, unsigned int len, int fl...
function sock_bind (line 336) | static int sock_bind(int fd, struct sockaddr *addr, unsigned int addrlen)
function sock_accept (line 367) | static int sock_accept(int fd, struct sockaddr *addr, unsigned int *addr...
function sock_connect (line 437) | static int sock_connect(int fd, struct sockaddr *addr, unsigned int addr...
function sock_listen (line 479) | static int sock_listen(int fd, int backlog)
function sock_shutdown (line 502) | static int sock_shutdown(int fd, uint16_t how)
function sock_io_setflags (line 525) | static int sock_io_setflags(struct pico_device *dev, struct ifreq *ifr)
function sock_io_setaddr (line 533) | static int sock_io_setaddr(struct pico_device *dev, struct ifreq *ifr)
function sock_io_setnetmask (line 548) | static int sock_io_setnetmask(struct pico_device *dev, struct ifreq *ifr)
function sock_io_getflags (line 564) | static int sock_io_getflags(struct pico_device *dev, struct ifreq *ifr)
function sock_io_getaddr (line 572) | static int sock_io_getaddr(struct pico_device *dev, struct ifreq *ifr)
function sock_io_gethwaddr (line 588) | static int sock_io_gethwaddr(struct pico_device *dev, struct ifreq *eth)
function sock_io_getbcast (line 603) | static int sock_io_getbcast(struct pico_device *dev, struct ifreq *ifr)
function sock_io_getnmask (line 618) | static int sock_io_getnmask(struct pico_device *dev, struct ifreq *ifr)
function sock_io_addroute (line 631) | static int sock_io_addroute(struct rtentry *rte)
function sock_io_delroute (line 658) | static int sock_io_delroute(struct rtentry *rte)
function sock_io_ethtool (line 680) | static int sock_io_ethtool(struct pico_device *dev, struct ifreq *ifr)
function sock_ioctl (line 685) | static int sock_ioctl(struct fnode *fno, const uint32_t cmd, void *arg)
function sysfs_net_dev_read (line 758) | static int sysfs_net_dev_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_net_route_list (line 808) | int sysfs_net_route_list(struct sysfs_fnode *sfs, void *buf, int len)
function sock_getsockopt (line 902) | static int sock_getsockopt(int sd, int level, int optname, void *optval,...
function sock_setsockopt (line 927) | static int sock_setsockopt(int sd, int level, int optname, void *optval,...
function sock_getsockname (line 949) | static int sock_getsockname(int sd, struct sockaddr *_addr, unsigned int...
function sock_getpeername (line 991) | static int sock_getpeername(int sd, struct sockaddr *_addr, unsigned int...
function sysfs_no_op (line 1035) | static int sysfs_no_op(struct sysfs_fnode *sfs, void *buf, int len)
function socket_in_init (line 1041) | void socket_in_init(void)
FILE: kernel/drivers/socket_in.h
type pico_bsd_endpoint (line 31) | struct pico_bsd_endpoint
type socklen_t (line 36) | typedef int socklen_t;
type in_addr (line 62) | struct in_addr {
type in6_addr (line 68) | struct in6_addr {
type sockaddr_in (line 72) | struct __attribute__((packed)) sockaddr_in {
type sockaddr_in6 (line 80) | struct __attribute__((packed)) sockaddr_in6 {
type sockaddr_storage (line 88) | struct __attribute__((packed)) sockaddr_storage {
type addrinfo (line 94) | struct addrinfo {
type hostent (line 107) | struct hostent {
type pico_fd_set_s (line 121) | struct pico_fd_set_s {
type pico_fd_set (line 125) | typedef struct pico_fd_set_s pico_fd_set;
type pico_time (line 139) | typedef pico_time time_t;
type timeval (line 144) | struct timeval {
type timespec (line 150) | struct timespec {
type timezone (line 156) | struct timezone {
type nfds_t (line 189) | typedef unsigned long int nfds_t;
type pollfd (line 191) | struct pollfd {
FILE: kernel/drivers/socket_un.c
type module (line 4) | struct module
type fnode (line 5) | struct fnode
function sock_check_fd (line 9) | static int sock_check_fd(int fd, struct fnode **fno)
function sock_poll (line 24) | static int sock_poll(int fd, uint16_t events, uint16_t *revents)
function sock_close (line 31) | static int sock_close(int fd)
function sock_socket (line 41) | int sock_socket(int domain, int type, int protocol)
function sock_recvfrom (line 48) | int sock_recvfrom(int fd, void *buf, unsigned int len, int flags, struct...
function sock_sendto (line 53) | int sock_sendto(int fd, const void *buf, unsigned int len, int flags, st...
function sock_bind (line 57) | int sock_bind(int fd, struct sockaddr *addr, unsigned int addrlen)
function sock_accept (line 62) | int sock_accept(int fd, struct sockaddr *addr, unsigned int *addrlen)
function sock_connect (line 67) | int sock_connect(int fd, struct sockaddr *addr, unsigned int addrlen)
function sock_listen (line 72) | int sock_listen(int fd, int backlog)
function sock_shutdown (line 77) | int sock_shutdown(int fd, uint16_t how)
function socket_un_init (line 83) | void socket_un_init(void)
FILE: kernel/drivers/spi.h
type spi_config (line 6) | struct spi_config {
type spi_slave (line 32) | struct spi_slave {
type spi_config (line 38) | struct spi_config
type spi_slave (line 39) | struct spi_slave
FILE: kernel/drivers/stm32_dma.c
function init_dma (line 30) | void init_dma(const struct dma_config * dma, uint32_t ptr, uint32_t len)
FILE: kernel/drivers/stm32_eth.c
type dev_eth (line 53) | struct dev_eth {
type module (line 61) | struct module
type dev_eth (line 66) | struct dev_eth
function eth_smi_get_phy_divider (line 75) | static uint32_t eth_smi_get_phy_divider(void)
function find_phy (line 109) | static int8_t find_phy(uint32_t clk_div)
function stm_eth_poll (line 125) | static int stm_eth_poll(struct pico_device *dev, int loop_score)
function stm_eth_send (line 141) | static int stm_eth_send(struct pico_device *dev, void * buf, int len)
function stm_eth_link_state (line 152) | static int stm_eth_link_state(struct pico_device *dev)
function mac_init (line 167) | static int mac_init(uint8_t * phy_addr, uint32_t clk_div)
function pico_eth_start_deferred (line 225) | static void pico_eth_start_deferred(uint32_t t, void *arg)
type eth_config (line 291) | struct eth_config
function ethernet_init_deferred (line 293) | static void ethernet_init_deferred(uint32_t t, void *arg)
function pico_eth_start (line 310) | int pico_eth_start(void) {
function ethernet_init (line 316) | int ethernet_init(const struct eth_config *conf)
function eth_isr (line 322) | void eth_isr(void)
FILE: kernel/drivers/stm32_i2c.c
type module (line 36) | struct module
type i2c_state (line 41) | enum i2c_state
type i2c_ev (line 56) | enum i2c_ev
type dev_i2c (line 71) | struct dev_i2c {
type dev_i2c (line 90) | struct dev_i2c
type dev_i2c (line 92) | struct dev_i2c
type i2c_ev (line 92) | enum i2c_ev
function i2c_ev (line 100) | static void i2c_ev(struct dev_i2c * i2c)
type dev_i2c (line 128) | struct dev_i2c
function i2c_er (line 138) | static void i2c_er(struct dev_i2c * i2c)
function i2c_rx_dma_complete (line 154) | static void i2c_rx_dma_complete(struct dev_i2c * i2c)
function i2c_tx_dma_complete (line 160) | static void i2c_tx_dma_complete(struct dev_i2c * i2c)
function i2c1_ev_isr (line 168) | void i2c1_ev_isr(void)
function i2c1_er_isr (line 172) | void i2c1_er_isr(void)
function dma1_stream5_isr (line 176) | void dma1_stream5_isr()
function dma1_stream6_isr (line 181) | void dma1_stream6_isr()
function i2c3_ev_isr (line 189) | void i2c3_ev_isr(void)
function i2c3_er_isr (line 193) | void i2c3_er_isr(void)
function dma1_stream2_isr (line 197) | void dma1_stream2_isr()
function dma1_stream4_isr (line 202) | void dma1_stream4_isr()
function restart_state_machine (line 210) | static void restart_state_machine(struct dev_i2c *i2c)
function state_machine (line 217) | static void state_machine(struct dev_i2c *i2c, enum i2c_ev ev)
function isr_kthread (line 366) | static void isr_kthread(struct i2c_slave *sl)
function i2c_kthread_read (line 374) | int i2c_kthread_read(struct i2c_slave *sl, uint8_t reg, uint8_t *buf, ui...
function i2c_kthread_write (line 402) | int i2c_kthread_write(struct i2c_slave *sl, uint8_t reg, const uint8_t *...
function i2c_init_read (line 429) | int i2c_init_read(struct i2c_slave *sl, uint8_t reg, uint8_t *buf, uint3...
function i2c_init_write (line 455) | int i2c_init_write(struct i2c_slave *sl, uint8_t reg, const uint8_t *buf...
function i2c_fno_init (line 481) | static int i2c_fno_init(const struct i2c_config *conf, struct dev_i2c *i)
function i2c_create (line 492) | int i2c_create(const struct i2c_config *conf)
FILE: kernel/drivers/stm32_lowpower.c
function lowpower_init (line 30) | int lowpower_init(void)
function lowpower_sleep (line 49) | int lowpower_sleep(int stdby, uint32_t interval)
function rtc_wkup_isr (line 142) | void rtc_wkup_isr(void)
FILE: kernel/drivers/stm32_rng.c
type dev_rng (line 37) | struct dev_rng {
type dev_rng (line 49) | struct dev_rng
type fnode (line 52) | struct fnode
type module (line 55) | struct module
function devrng_read (line 65) | static int devrng_read(struct fnode *fno, void *buf, unsigned int len)
function rng_isr (line 106) | void rng_isr(void)
function rng_create (line 145) | int rng_create(uint32_t base, uint32_t rcc)
type frand_ops (line 163) | struct frand_ops
type frand_info (line 165) | struct frand_info
type frand_ops (line 165) | struct frand_ops
function rng_init (line 168) | int rng_init(void)
FILE: kernel/drivers/stm32_sdio.c
type module (line 58) | struct module
type dev_sd (line 60) | struct dev_sd
function stm32_sdio_bus (line 100) | int
function stm32_sdio_reset (line 155) | void
function stm32_sdio_bit_slice (line 212) | uint32_t
function stm32_sdio_command (line 254) | int
function sdio_select (line 336) | static int
function sdio_scr (line 360) | static int
function sdio_block_read (line 427) | int sdio_block_read(struct fnode *fno, void *_buf, uint32_t lba, int off...
function sdio_block_write (line 498) | int
type SDIO_CARD_DATA (line 635) | struct SDIO_CARD_DATA
function SDIO_CARD (line 648) | SDIO_CARD
function stm32_sdio_card_detect (line 777) | static void stm32_sdio_card_detect(void *arg)
function sdio_hw_init (line 796) | static void sdio_hw_init(struct sdio_config *conf)
function sdio_init (line 811) | int sdio_init(struct sdio_config *conf)
FILE: kernel/drivers/stm32_sdio.h
type SDIO_CLOCK_DIV (line 6) | enum SDIO_CLOCK_DIV {
type SDIO_POWER_STATE (line 16) | enum SDIO_POWER_STATE {
type SDIO_CARD_DATA (line 25) | struct SDIO_CARD_DATA {
type dev_sd (line 36) | struct dev_sd {
type dev_sd (line 44) | struct dev_sd
type SDIO_CLOCK_DIV (line 44) | enum SDIO_CLOCK_DIV
type dev_sd (line 46) | struct dev_sd
type SDIO_POWER_STATE (line 46) | enum SDIO_POWER_STATE
type dev_sd (line 47) | struct dev_sd
type dev_sd (line 48) | struct dev_sd
type SD_CLOCK_DIV (line 57) | enum SD_CLOCK_DIV {
FILE: kernel/drivers/stm32_spi.c
type module (line 37) | struct module
type dev_spi (line 42) | struct dev_spi {
type dev_spi (line 55) | struct dev_spi
function spi_rx_dma_complete (line 57) | static void spi_rx_dma_complete(struct spi_slave * sl)
function spi_isr (line 70) | void spi_isr(void)
function dma2_stream2_isr (line 74) | void dma2_stream2_isr()
function dma2_stream3_isr (line 82) | void dma2_stream3_isr()
function devspi_xfer (line 88) | int devspi_xfer(struct spi_slave *sl, const char *obuf, char *ibuf, unsi...
function devspi_create (line 121) | int devspi_create(const struct spi_config *conf)
FILE: kernel/drivers/stm32_usb.c
type module (line 35) | struct module
type module (line 40) | struct module
type usbd_device (line 62) | struct usbd_device
function otg_fs_isr (line 65) | void otg_fs_isr(void)
function otg_hs_isr (line 71) | void otg_hs_isr(void)
function kthread_usbhost (line 77) | static void kthread_usbhost(void *arg)
function usbdev_start (line 91) | int usbdev_start(usbd_device **usbd_dev, unsigned int dev,
type usb_host_driver (line 111) | struct usb_host_driver {
type usb_host_claim (line 117) | struct usb_host_claim {
type usb_host_driver (line 135) | struct usb_host_driver
type usb_host_claim (line 136) | struct usb_host_claim
function usb_host_driver_register (line 138) | int usb_host_driver_register(struct module *owner,
function interface_claimed (line 162) | bool interface_claimed(usbh_device *dev, uint8_t bInterfaceNumber)
function usb_host_claim_interface (line 188) | int usb_host_claim_interface(struct module *owner,
function usb_host_release_interface (line 221) | int usb_host_release_interface(usbh_device *dev, uint8_t bInterfaceNumber)
function host_dev_disconnected_callback (line 262) | static void host_dev_disconnected_callback(usbh_device *dev)
function host_set_config_callback (line 293) | static void host_set_config_callback(const usbh_transfer *transfer,
function host_config_desc_read_callback (line 314) | static void host_config_desc_read_callback(const usbh_transfer *transfer,
function host_dev_desc_read_callback (line 340) | static void host_dev_desc_read_callback(const usbh_transfer *transfer,
function host_dev_connected_callback (line 360) | static void host_dev_connected_callback(usbh_device *dev)
function usbhost_start (line 367) | static void usbhost_start(void)
function usb_init (line 385) | int usb_init(struct usb_config *conf)
FILE: kernel/drivers/stm32f4_adc.c
type dev_adc (line 36) | struct dev_adc{
type dev_adc (line 49) | struct dev_adc
type fnode (line 51) | struct fnode
type module (line 53) | struct module
function dma2_stream0_isr (line 60) | void dma2_stream0_isr()
function devadc_read (line 74) | static int devadc_read(struct fnode *fno, void *buf, unsigned int len)
function adc_fno_init (line 109) | static void adc_fno_init(struct fnode *dev, uint32_t n, const struct adc...
function adc_init (line 122) | void adc_init(const struct adc_config adc_configs[], int num_adcs)
FILE: kernel/drivers/stm32f4_dsp.c
type dev_dsp (line 40) | struct dev_dsp {
type fnode (line 52) | struct fnode
type fnode (line 53) | struct fnode
type module (line 55) | struct module
function dsp_read (line 63) | int dsp_read(struct fnode *fno, void *buf, unsigned int len)
function dsp_xmit (line 69) | static void dsp_xmit(void)
function dsp_write (line 88) | int dsp_write(struct fnode *fno, const void *buf, unsigned int len)
function dma1_stream5_isr (line 124) | void dma1_stream5_isr(void)
function timer_setup (line 147) | static void timer_setup(void)
function dsp_dma_setup (line 172) | static void dsp_dma_setup(void)
function dsp_hw_init (line 192) | static void dsp_hw_init(data_channel c)
function dsp_init (line 204) | int dsp_init(void)
FILE: kernel/drivers/stm32f4_sdram.c
type sdram_timing (line 70) | struct sdram_timing
function sdram_init (line 84) | void
FILE: kernel/drivers/stm32f7_ltdc.c
type fb_info (line 30) | struct fb_info
type module (line 32) | struct module
function ltdc_destroy (line 39) | static void ltdc_destroy(struct fb_info *fb)
function ltdc_config_layer (line 47) | static int ltdc_config_layer(struct fb_info *fb)
function ltdc_config (line 124) | static void ltdc_config(void)
function ltdc_clock (line 143) | static void ltdc_clock(void)
function ltdc_blank (line 169) | static int ltdc_blank(struct fb_info *fb)
function ltdc_screen_on (line 175) | static void ltdc_screen_on(void)
function ltdc_enable_clut (line 183) | void ltdc_enable_clut(void)
function ltdc_config_clut (line 193) | void ltdc_config_clut(uint32_t *CLUT, uint32_t size)
function ltdc_set_cmap (line 205) | int ltdc_set_cmap(uint32_t *cmap, struct fb_info *info)
function ltdc_open (line 213) | static int ltdc_open(struct fb_info *info)
type fb_ops (line 218) | struct fb_ops
type fb_info (line 224) | struct fb_info
type fb_ops (line 225) | struct fb_ops
function lcd_pinmux (line 230) | static void lcd_pinmux(void)
function ltdc_init (line 310) | void ltdc_init(void)
FILE: kernel/drivers/stm32f7_sdram.c
type sdram_timing (line 70) | struct sdram_timing
function sdram_init (line 83) | void sdram_init(void)
FILE: kernel/drivers/stmpe811.c
type stmpe811_state (line 114) | enum stmpe811_state {
type insta (line 124) | enum insta {
type dev_stmpe811 (line 184) | struct dev_stmpe811 {
type fnode (line 193) | struct fnode
type fnode (line 194) | struct fnode
type dev_stmpe811 (line 195) | struct dev_stmpe811
type module (line 197) | struct module
type dev_stmpe811 (line 209) | struct dev_stmpe811
type dev_stmpe811 (line 209) | struct dev_stmpe811
type dev_stmpe811 (line 216) | struct dev_stmpe811
type dev_stmpe811 (line 216) | struct dev_stmpe811
type dev_stmpe811 (line 225) | struct dev_stmpe811
type dev_stmpe811 (line 225) | struct dev_stmpe811
type dev_stmpe811 (line 234) | struct dev_stmpe811
type dev_stmpe811 (line 234) | struct dev_stmpe811
type dev_stmpe811 (line 241) | struct dev_stmpe811
type dev_stmpe811 (line 241) | struct dev_stmpe811
type dev_stmpe811 (line 250) | struct dev_stmpe811
type dev_stmpe811 (line 250) | struct dev_stmpe811
type dev_stmpe811 (line 259) | struct dev_stmpe811
type dev_stmpe811 (line 259) | struct dev_stmpe811
type dev_stmpe811 (line 266) | struct dev_stmpe811
type dev_stmpe811 (line 266) | struct dev_stmpe811
type dev_stmpe811 (line 275) | struct dev_stmpe811
type dev_stmpe811 (line 275) | struct dev_stmpe811
type dev_stmpe811 (line 284) | struct dev_stmpe811
type dev_stmpe811 (line 284) | struct dev_stmpe811
type dev_stmpe811 (line 293) | struct dev_stmpe811
type dev_stmpe811 (line 293) | struct dev_stmpe811
type dev_stmpe811 (line 302) | struct dev_stmpe811
type dev_stmpe811 (line 302) | struct dev_stmpe811
type dev_stmpe811 (line 312) | struct dev_stmpe811
type dev_stmpe811 (line 312) | struct dev_stmpe811
type dev_stmpe811 (line 322) | struct dev_stmpe811
type dev_stmpe811 (line 322) | struct dev_stmpe811
type dev_stmpe811 (line 331) | struct dev_stmpe811
type dev_stmpe811 (line 331) | struct dev_stmpe811
type dev_stmpe811 (line 341) | struct dev_stmpe811
type dev_stmpe811 (line 341) | struct dev_stmpe811
type dev_stmpe811 (line 350) | struct dev_stmpe811
type dev_stmpe811 (line 350) | struct dev_stmpe811
type dev_stmpe811 (line 359) | struct dev_stmpe811
type dev_stmpe811 (line 359) | struct dev_stmpe811
type dev_stmpe811 (line 368) | struct dev_stmpe811
type dev_stmpe811 (line 368) | struct dev_stmpe811
type dev_stmpe811 (line 377) | struct dev_stmpe811
type dev_stmpe811 (line 377) | struct dev_stmpe811
type dev_stmpe811 (line 386) | struct dev_stmpe811
type dev_stmpe811 (line 386) | struct dev_stmpe811
type dev_stmpe811 (line 395) | struct dev_stmpe811
type dev_stmpe811 (line 395) | struct dev_stmpe811
type dev_stmpe811 (line 404) | struct dev_stmpe811
type dev_stmpe811 (line 404) | struct dev_stmpe811
type dev_stmpe811 (line 413) | struct dev_stmpe811
type dev_stmpe811 (line 413) | struct dev_stmpe811
type dev_stmpe811 (line 422) | struct dev_stmpe811
type dev_stmpe811 (line 422) | struct dev_stmpe811
type dev_stmpe811 (line 431) | struct dev_stmpe811
type dev_stmpe811 (line 431) | struct dev_stmpe811
type dev_stmpe811 (line 440) | struct dev_stmpe811
type dev_stmpe811 (line 440) | struct dev_stmpe811
type dev_stmpe811 (line 449) | struct dev_stmpe811
type dev_stmpe811 (line 449) | struct dev_stmpe811
type dev_stmpe811 (line 458) | struct dev_stmpe811
type dev_stmpe811 (line 458) | struct dev_stmpe811
type dev_stmpe811 (line 467) | struct dev_stmpe811
type dev_stmpe811 (line 467) | struct dev_stmpe811
type dev_stmpe811 (line 476) | struct dev_stmpe811
type dev_stmpe811 (line 476) | struct dev_stmpe811
type dev_stmpe811 (line 485) | struct dev_stmpe811
type dev_stmpe811 (line 485) | struct dev_stmpe811
type dev_stmpe811 (line 494) | struct dev_stmpe811
type dev_stmpe811 (line 494) | struct dev_stmpe811
type dev_stmpe811 (line 503) | struct dev_stmpe811
type dev_stmpe811 (line 503) | struct dev_stmpe811
type dev_stmpe811 (line 512) | struct dev_stmpe811
type dev_stmpe811 (line 512) | struct dev_stmpe811
type dev_stmpe811 (line 521) | struct dev_stmpe811
type dev_stmpe811 (line 521) | struct dev_stmpe811
type dev_stmpe811 (line 530) | struct dev_stmpe811
type dev_stmpe811 (line 530) | struct dev_stmpe811
type ts_init (line 539) | struct ts_init {
type ts_init (line 544) | struct ts_init
type dev_stmpe811 (line 605) | struct dev_stmpe811
type dev_stmpe811 (line 605) | struct dev_stmpe811
type dev_stmpe811 (line 613) | struct dev_stmpe811
type dev_stmpe811 (line 613) | struct dev_stmpe811
type dev_stmpe811 (line 633) | struct dev_stmpe811
type dev_stmpe811 (line 633) | struct dev_stmpe811
type dev_stmpe811 (line 642) | struct dev_stmpe811
type dev_stmpe811 (line 642) | struct dev_stmpe811
type dev_stmpe811 (line 651) | struct dev_stmpe811
type dev_stmpe811 (line 651) | struct dev_stmpe811
type dev_stmpe811 (line 660) | struct dev_stmpe811
type dev_stmpe811 (line 660) | struct dev_stmpe811
type ts_read_state (line 672) | enum ts_read_state {
type ts_read (line 680) | struct ts_read {
type ts_read (line 685) | struct ts_read
function stmpe811_tx_isr (line 693) | static void stmpe811_tx_isr(struct i2c_slave *arg)
function stmpe811_rx_isr (line 703) | static void stmpe811_rx_isr(struct i2c_slave *arg)
function ts_isr (line 718) | static void ts_isr(void *arg)
function devstmpe811_read (line 725) | static int devstmpe811_read(struct fnode *fno, void *buf, unsigned int len)
function devstmpe811_close (line 757) | static int devstmpe811_close(struct fnode *fno)
function stmpe811_fno_init (line 763) | static int stmpe811_fno_init(struct dev_stmpe811 *s)
function stmpe811_init (line 779) | int stmpe811_init(struct ts_config *ts)
FILE: kernel/drivers/stmpe811.h
type ts_config (line 6) | struct ts_config {
type ts_config (line 12) | struct ts_config
FILE: kernel/drivers/tty_console.c
type tty_console (line 33) | struct tty_console {
type fnode (line 42) | struct fnode
type fnode (line 43) | struct fnode
type fnode (line 44) | struct fnode
type fnode (line 45) | struct fnode
type fnode (line 46) | struct fnode
type module (line 48) | struct module
function devfile_create (line 59) | static void devfile_create(void)
function tty_console_init (line 68) | int tty_console_init(void)
function tty_send_break (line 80) | static void tty_send_break(void *arg)
function tty_read (line 87) | static int tty_read(struct fnode *fno, void *buf, unsigned int len)
function tty_poll (line 104) | static int tty_poll(struct fnode *fno, uint16_t events, uint16_t *revents)
function tty_write (line 113) | static int tty_write(struct fnode *fno, const void *buf, unsigned int len)
function tty_seek (line 120) | static int tty_seek(struct fnode *fno, int off, int whence)
function tty_attach (line 129) | static void tty_attach(struct fnode *fno, int pid)
FILE: kernel/drivers/uart.c
function get_interrupt_source (line 36) | static inline uint32_t get_interrupt_source(uint32_t base)
function get_interrupt_source (line 47) | static inline uint32_t get_interrupt_source(uint32_t base)
function get_interrupt_source (line 56) | static inline uint32_t get_interrupt_source(uint32_t base)
function get_interrupt_source (line 71) | static inline uint32_t get_interrupt_source(uint32_t base)
function get_interrupt_source (line 111) | static inline uint32_t get_interrupt_source(uint32_t base)
type dev_uart (line 120) | struct dev_uart {
type dev_uart (line 131) | struct dev_uart
type fnode (line 133) | struct fnode
type fnode (line 134) | struct fnode
type fnode (line 135) | struct fnode
type fnode (line 136) | struct fnode
type module (line 138) | struct module
function uart_send_break (line 148) | static void uart_send_break(void *arg)
function devuart_tty_attach (line 155) | static void devuart_tty_attach(struct fnode *fno, int pid)
function uart_isr (line 164) | void uart_isr(struct dev_uart *uart)
function uart0_isr (line 216) | void uart0_isr(void)
function uart1_isr (line 221) | void uart1_isr(void)
function uart2_isr (line 226) | void uart2_isr(void)
function usart0_isr (line 232) | void usart0_isr(void)
function usart1_isr (line 239) | void usart1_isr(void)
function usart2_isr (line 245) | void usart2_isr(void)
function usart3_isr (line 251) | void usart3_isr(void)
function usart6_isr (line 257) | void usart6_isr(void)
function devuart_write (line 264) | static int devuart_write(struct fnode *fno, const void *buf, unsigned in...
function devuart_read (line 332) | static int devuart_read(struct fnode *fno, void *buf, unsigned int len)
function devuart_poll (line 374) | static int devuart_poll(struct fnode *fno, uint16_t events, uint16_t *re...
function uart_fno_init (line 399) | static int uart_fno_init(const struct uart_config * addr)
function uart_create (line 424) | int uart_create(const struct uart_config *uart)
function uart_init (line 458) | int uart_init(void)
FILE: kernel/drivers/uart.h
type uart_config (line 10) | struct uart_config {
type uart_config (line 28) | struct uart_config
FILE: kernel/drivers/uart_dev.h
function uart_rx (line 22) | static inline char uart_rx(uint32_t *base)
function uart_poll_rx (line 28) | static inline int uart_poll_rx(uint32_t *base)
function uart_enter_irq (line 33) | static inline void uart_enter_irq(uint32_t *base)
function uart_tx (line 44) | static inline void uart_tx(uint32_t *base, char c)
FILE: kernel/drivers/usb.h
type usbh_device (line 18) | struct usbh_device
type usb_device_descriptor (line 19) | struct usb_device_descriptor
type usb_config_descriptor (line 20) | struct usb_config_descriptor
type usbh_device (line 23) | struct usbh_device
type module (line 25) | struct module
type module (line 28) | struct module
type usb_pio_config_fs (line 35) | struct usb_pio_config_fs {
type usb_pio_config_hs (line 42) | struct usb_pio_config_hs {
type usb_config (line 50) | struct usb_config {
type usb_config (line 61) | struct usb_config
type usbd_info (line 63) | struct usbd_info
FILE: kernel/drivers/usb/usb_kbd.c
type fnode (line 88) | struct fnode
type fnode (line 89) | struct fnode
type fnode (line 90) | struct fnode
type usbh_device (line 91) | struct usbh_device
type module (line 93) | struct module
type keyboard (line 107) | struct keyboard {
function kbd_data_in (line 121) | static void kbd_data_in(const uint8_t *data, unsigned len)
function endpoint_read_cb (line 192) | static void endpoint_read_cb (const usbh_transfer *transfer,
function read_data_from_keyboard (line 211) | static void read_data_from_keyboard(usbh_device *dev)
function devfile_create (line 230) | static void devfile_create(void)
function after_set_idle (line 239) | static void after_set_idle(const usbh_transfer *transfer,
function after_set_protocol_boot (line 247) | static void after_set_protocol_boot(const usbh_transfer *transfer,
function after_interface_set (line 258) | static void after_interface_set(const usbh_transfer *transfer,
function after_config_set (line 267) | static void after_config_set(const usbh_transfer *transfer,
function usb_kbd_probe (line 279) | static void usb_kbd_probe( struct usbh_device *dev,
function usb_kbd_disconnect (line 364) | static void usb_kbd_disconnect(struct usbh_device *dev, uint8_t bInterfa...
function usb_kbd_init (line 370) | void usb_kbd_init(void)
function kbd_read (line 377) | static int kbd_read(struct fnode *fno, void *buf, unsigned int len)
function kbd_poll (line 395) | static int kbd_poll(struct fnode *fno, uint16_t events, uint16_t *revents)
function kbd_ioctl (line 408) | static int kbd_ioctl(struct fnode *fno, const uint32_t cmd, void *arg)
FILE: kernel/drivers/usb/usbh_drivers.h
function usbh_drivers_init (line 11) | static inline void usbh_drivers_init(void)
FILE: kernel/drivers/xadow_LED_5x7.c
type dev_matrix (line 38) | struct dev_matrix {
type task (line 46) | struct task
function xadow_led_read (line 51) | static int xadow_led_read(struct fnode *fno, void *buf, unsigned int len)
function xadow_led_write (line 57) | static int xadow_led_write(struct fnode *fno, const void *buf, unsigned ...
function xadow_led_task (line 73) | static void xadow_led_task(void *arg)
function xadow_led_open (line 87) | static int xadow_led_open(const char *path, int flags)
function xadow_led_close (line 96) | static int xadow_led_close(struct fnode *f)
type module (line 105) | struct module
function xadow_led_init (line 115) | int xadow_led_init(uint32_t bus)
FILE: kernel/fpb.c
type bkpt (line 48) | struct bkpt {
type bkpt (line 53) | struct bkpt
function debug_monitor_handler (line 55) | void debug_monitor_handler(void)
function fpb_setbrk (line 64) | int fpb_setbrk(int pid, void *bpoint, int n)
function fpb_delbrk (line 88) | int fpb_delbrk(int n)
function fpb_init (line 95) | int fpb_init(void)
FILE: kernel/framebuffer.c
type fb_info (line 35) | struct fb_info
type fnode (line 37) | struct fnode
type fnode (line 38) | struct fnode
type fnode (line 40) | struct fnode
type fnode (line 41) | struct fnode
type module (line 43) | struct module
function fb_open (line 54) | static int fb_open(const char *path, int flags)
function fb_write (line 62) | static int fb_write(struct fnode *fno, const void *buf, unsigned int len)
function fb_read (line 94) | static int fb_read(struct fnode *fno, void *buf, unsigned int len)
function fb_seek (line 126) | static int fb_seek(struct fnode *fno, int off, int whence)
function fb_fno_init (line 155) | static int fb_fno_init(struct fnode *dev, struct fb_info * fb)
function fb_ioctl (line 169) | static int fb_ioctl(struct fnode * fno, const uint32_t cmd, void *arg)
function framebuffer_setcmap (line 197) | int framebuffer_setcmap(uint32_t *ptr)
function register_framebuffer (line 203) | int register_framebuffer(struct fb_info *fb_info)
FILE: kernel/frand.h
type frand_ops (line 10) | struct frand_ops
type frand_info (line 12) | struct frand_info {
type frand_ops (line 17) | struct frand_ops {
type frand_info (line 24) | struct frand_info
type fnode (line 27) | struct fnode
FILE: kernel/frosted.c
type pico_device (line 50) | struct pico_device
function simple_hard_fault_handler (line 64) | void simple_hard_fault_handler(void)
function hardfault_handler_dbg (line 94) | void hardfault_handler_dbg(unsigned long *hardfault_args){
function hardfault_handler_dbg (line 128) | void hardfault_handler_dbg(unsigned long *sp)
function hard_fault_handler (line 136) | __attribute__((naked)) void hard_fault_handler(void)
function mem_manage_handler (line 150) | void mem_manage_handler(void)
function bus_fault_handler (line 168) | void bus_fault_handler(void)
function usage_fault_handler (line 173) | void usage_fault_handler(void)
function hw_init (line 178) | static void hw_init(void)
function frosted_init (line 191) | int frosted_init(void)
function frosted_tcpip_wakeup (line 241) | void frosted_tcpip_wakeup(void)
type usbh_host (line 251) | struct usbh_host
function frosted_kernel (line 254) | void frosted_kernel(int xipfs_mounted)
function main (line 306) | void main(void)
FILE: kernel/frosted.h
type task (line 34) | struct task
type fnode (line 35) | struct fnode
type semaphore (line 36) | struct semaphore
type termios (line 37) | struct termios
type sem_t (line 38) | typedef struct semaphore sem_t;
type mutex_t (line 39) | typedef struct semaphore mutex_t;
type sigset_t (line 41) | typedef uint32_t sigset_t;
type ktimer (line 61) | struct ktimer
type ktimer (line 64) | struct ktimer
type sysfs_fnode (line 68) | struct sysfs_fnode {
type vfs_info (line 90) | struct vfs_info
type vfs_info (line 91) | struct vfs_info
type task (line 101) | struct task
type task (line 105) | struct task
type task (line 106) | struct task
type task (line 107) | struct task
type task (line 110) | struct task
type fnode (line 117) | struct fnode
type fnode (line 122) | struct fnode
type fnode (line 123) | struct fnode
type fnode (line 124) | struct fnode
type fnode (line 134) | struct fnode
type fnode (line 135) | struct fnode
type timespec (line 145) | struct timespec
type task (line 168) | struct task
type task (line 172) | struct task
type module (line 175) | struct module
type module (line 176) | struct module
type module (line 177) | struct module
type module (line 178) | struct module
type fnode (line 192) | struct fnode
type fnode (line 193) | struct fnode
type fnode (line 231) | struct fnode {
type mountpoint (line 248) | struct mountpoint
type fnode (line 254) | struct fnode
type module (line 254) | struct module
type fnode (line 254) | struct fnode
type fnode (line 255) | struct fnode
type module (line 255) | struct module
type fnode (line 255) | struct fnode
type fnode (line 256) | struct fnode
type module (line 256) | struct module
type fnode (line 256) | struct fnode
type fnode (line 257) | struct fnode
type module (line 257) | struct module
type fnode (line 257) | struct fnode
type fnode (line 258) | struct fnode
type fnode (line 259) | struct fnode
type module (line 263) | struct module
type module (line 274) | struct module {
type sysfs_fnode (line 352) | struct sysfs_fnode
type sysfs_fnode (line 353) | struct sysfs_fnode
FILE: kernel/fs/fatfs.c
type module (line 24) | struct module
type fatfs_disk (line 26) | struct fatfs_disk {
type fatfs_priv (line 32) | struct fatfs_priv {
type fatfs (line 43) | struct fatfs {
type fatfs_dir (line 58) | struct fatfs_dir {
type fnode (line 131) | struct fnode
function st_word (line 133) | static void st_word(uint8_t *ptr, uint16_t val) /* Store a 2-byte word ...
function st_dword (line 140) | static void st_dword(uint8_t *ptr, uint32_t val) /* Store a 4-byte wo...
function check_fs (line 151) | static int check_fs(struct fatfs_disk *fsd)
function get_fat (line 172) | int get_fat(struct fatfs_disk *fsd, int clust)
function set_fat (line 196) | int set_fat(struct fatfs_disk *fsd, uint32_t clust, uint32_t val)
function get_clust (line 222) | static int get_clust(struct fatfs *fs, uint8_t *dir)
function set_clust (line 238) | int set_clust(struct fatfs *fs, uint8_t *dir, uint32_t clust)
function walk_fat (line 251) | static int walk_fat(struct fatfs_disk *fsd)
function init_fat (line 269) | static int init_fat(struct fatfs_disk *fsd)
function dir_rewind (line 284) | static int dir_rewind(struct fatfs *fs, struct fatfs_dir *dj)
function dir_read (line 302) | static int dir_read(struct fatfs_disk *fsd, struct fatfs_dir *dj)
function add_dir (line 365) | static int add_dir(struct fatfs *fs, struct fatfs_dir *dj, char *name)
type fatfs_disk (line 389) | struct fatfs_disk
function fatfs_populate (line 397) | static void fatfs_populate(struct fatfs_disk *f, char *path, uint32_t cl...
function fatfs_mount (line 479) | int fatfs_mount(char *source, char *tgt, uint32_t flags, void *arg)
function fatfs_open (line 587) | int fatfs_open(const char *path, int flags)
function dir_find (line 612) | static int dir_find(struct fatfs_disk *fsd, struct fatfs_dir *dj, char *...
function follow_path (line 630) | static int follow_path(struct fatfs_disk *fsd, struct fatfs_dir *dj, cha...
function fatfs_creat (line 673) | int fatfs_creat(struct fnode *fno)
function fatfs_read (line 724) | int fatfs_read(struct fnode *fno, void *buf, unsigned int len)
function fatfs_write (line 779) | int fatfs_write(struct fnode *fno, const void *buf, unsigned int len)
function fatfs_seek (line 854) | int fatfs_seek(struct fnode *fno, int off, int whence)
function fatfs_truncate (line 884) | int fatfs_truncate(struct fnode *fno, unsigned int len)
function fatfs_unlink (line 904) | int fatfs_unlink(struct fnode *fno)
function fatfs_close (line 918) | int fatfs_close(struct fnode *fno)
function fatfs_init (line 925) | int fatfs_init(void)
FILE: kernel/fs/memfs.c
type module (line 24) | struct module
type memfs_fnode (line 27) | struct memfs_fnode {
function memfs_read (line 33) | static int memfs_read(struct fnode *fno, void *buf, unsigned int len)
function memfs_write (line 59) | static int memfs_write(struct fnode *fno, const void *buf, unsigned int ...
function memfs_poll (line 85) | static int memfs_poll(struct fnode *fno, uint16_t events, uint16_t *reve...
function memfs_seek (line 91) | static int memfs_seek(struct fnode *fno, int off, int whence)
function memfs_close (line 124) | static int memfs_close(struct fnode *fno)
function memfs_creat (line 133) | static int memfs_creat(struct fnode *fno)
function memfs_unlink (line 146) | static int memfs_unlink(struct fnode *fno)
function memfs_truncate (line 158) | static int memfs_truncate(struct fnode *fno, unsigned int newsize)
function memfs_mount (line 182) | static int memfs_mount(char *source, char *tgt, uint32_t flags, void *arg)
function memfs_init (line 209) | void memfs_init(void)
FILE: kernel/fs/sysfs.c
type fnode (line 29) | struct fnode
type module (line 30) | struct module
type mountpoint (line 34) | struct mountpoint
type f_malloc_stats (line 35) | struct f_malloc_stats
function sysfs_lock (line 38) | void sysfs_lock(void)
function sysfs_unlock (line 44) | void sysfs_unlock(void)
function sysfs_read (line 50) | static int sysfs_read(struct fnode *fno, void *buf, unsigned int len)
function sysfs_write (line 67) | static int sysfs_write(struct fnode *fno, const void *buf, unsigned int ...
function sysfs_poll (line 84) | static int sysfs_poll(struct fnode *fno, uint16_t events, uint16_t *reve...
function sysfs_close (line 90) | static int sysfs_close(struct fnode *fno)
function ul_to_str (line 99) | int ul_to_str(unsigned long n, char *s)
function nice_to_str (line 131) | int nice_to_str(int8_t n, char *s)
function sysfs_time_read (line 167) | int sysfs_time_read(struct sysfs_fnode *sfs, void *buf, int len)
function strtou32 (line 184) | static uint32_t strtou32(const char *ptr) {
function sysfs_suspend_write (line 198) | static int sysfs_suspend_write(struct sysfs_fnode *sfs, const void *buf,...
function sysfs_standby_write (line 206) | static int sysfs_standby_write(struct sysfs_fnode *sfs, const void *buf,...
function gpio_basename (line 215) | static int gpio_basename(const uint32_t base, char *name)
function sysfs_pins_read (line 260) | int sysfs_pins_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_tasks_read (line 426) | int sysfs_tasks_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_mem_read (line 511) | int sysfs_mem_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_modules_read (line 595) | int sysfs_modules_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_mtab_read (line 639) | int sysfs_mtab_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_no_write (line 708) | int sysfs_no_write(struct sysfs_fnode *sfs, const void *buf, int len)
function sysfs_no_read (line 713) | int sysfs_no_read(struct sysfs_fnode *sfs, void *buf, int len)
function sysfs_register (line 719) | int sysfs_register(char *name, char *dir,
function sysfs_mount (line 739) | static int sysfs_mount(char *source, char *tgt, uint32_t flags, void *args)
function sysfs_init (line 779) | void sysfs_init(void)
FILE: kernel/fs/xipfs.c
type fnode (line 29) | struct fnode
type module (line 30) | struct module
type xipfs_fnode (line 32) | struct xipfs_fnode {
function xipfs_read (line 41) | static int xipfs_read(struct fnode *fno, void *buf, unsigned int len)
function xipfs_block_read (line 64) | static int xipfs_block_read(struct fnode *fno, void *buf, uint32_t secto...
function xipfs_write (line 79) | static int xipfs_write(struct fnode *fno, const void *buf, unsigned int ...
function xipfs_poll (line 84) | static int xipfs_poll(struct fnode *fno, uint16_t events, uint16_t *reve...
function xipfs_seek (line 89) | static int xipfs_seek(struct fnode *fno, int off, int whence)
function xipfs_close (line 94) | static int xipfs_close(struct fnode *fno)
function xipfs_creat (line 99) | static int xipfs_creat(struct fnode *fno)
type fnode (line 105) | struct fnode
type xipfs_fnode (line 107) | struct xipfs_fnode
type xipfs_fnode (line 107) | struct xipfs_fnode
type vfs_info (line 111) | struct vfs_info
type vfs_info (line 116) | struct vfs_info
function xipfs_unlink (line 136) | static int xipfs_unlink(struct fnode *fno)
function xip_add (line 141) | static int xip_add(const char *name, const void (*init), uint32_t size)
function xipfs_parse_blob (line 160) | static int xipfs_parse_blob(const uint8_t *blob)
function xipfs_mount (line 188) | static int xipfs_mount(char *source, char *tgt, uint32_t flags, void *arg)
function xipfs_init (line 214) | void xipfs_init(void)
FILE: kernel/fs/xipfs.h
type xipfs_fat (line 7) | struct xipfs_fat {
type xipfs_fhdr (line 14) | struct xipfs_fhdr {
FILE: kernel/getaddrinfo.c
function sys_getaddrinfo_hdlr (line 24) | int sys_getaddrinfo_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, ui...
function sys_freeaddrinfo_hdlr (line 29) | int sys_freeaddrinfo_hdlr(uint32_t arg1)
type dnsquery_cookie (line 42) | struct dnsquery_cookie
type waiting_task (line 50) | struct waiting_task {
function get_port (line 56) | static uint16_t get_port(char *service)
type dnsquery_cookie (line 75) | struct dnsquery_cookie
type dnsquery_cookie (line 76) | struct dnsquery_cookie
type waiting_task (line 77) | struct waiting_task
function dns_is_busy (line 80) | static int dns_is_busy(void)
function add_to_waiting_list (line 91) | static int add_to_waiting_list(void)
function dns_ip6_cb (line 102) | static void dns_ip6_cb(char *ip, void *arg)
function dns_ip4_cb (line 133) | static void dns_ip4_cb(char *ip, void *arg)
function dns_idle (line 164) | static void dns_idle(void)
function pico_getaddrinfo (line 178) | static int pico_getaddrinfo(const char *node, const char *service, const...
function pico_freeaddrinfo (line 277) | static int pico_freeaddrinfo(struct addrinfo *res)
function sys_getaddrinfo_hdlr (line 292) | int sys_getaddrinfo_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, ui...
function sys_freeaddrinfo_hdlr (line 299) | int sys_freeaddrinfo_hdlr(uint32_t arg1)
FILE: kernel/hardfault_debug.c
function HardFault_Handler (line 11) | __attribute__((naked))
function UsageFault_Handler (line 28) | __attribute__((naked))
function HardFault_HandlerC (line 68) | void HardFault_HandlerC(unsigned long *hardfault_args){
FILE: kernel/heap.h
type heap_element_ (line 37) | struct heap_element_
FILE: kernel/interrupts.h
function irq_off (line 8) | static void irq_off(void)
function irq_on (line 12) | static void irq_on(void)
function irq_setmask (line 16) | static void irq_setmask(void)
function irq_clearmask (line 20) | static void irq_clearmask(void)
function irq_setmask (line 26) | static inline void irq_setmask(void)
function irq_clearmask (line 31) | static inline void irq_clearmask(void)
function irq_off (line 36) | static inline void irq_off(void)
function irq_on (line 41) | static inline void irq_on(void)
FILE: kernel/kprintf.c
type dev_klog (line 34) | struct dev_klog {
type dev_klog (line 41) | struct dev_klog
function klog_open (line 44) | static int klog_open(const char *path, int flags)
function klog_close (line 52) | static int klog_close(struct fnode *f)
function klog_read (line 59) | static int klog_read(struct fnode *fno, void *buf, unsigned int len)
function klog_poll (line 76) | static int klog_poll(struct fnode *fno, uint16_t events, uint16_t *revents)
type module (line 87) | struct module
function printchar (line 98) | static void printchar(char **str, int c)
function prints (line 116) | static int prints(char **out, const char *string, int width, int pad)
function printi (line 149) | static int printi(char **out, int i, int b, int sg, int width, int pad, ...
function print (line 192) | static int print(char **out, const char *format, va_list args )
function kprintf (line 261) | int kprintf(const char *format, ...)
function ksprintf (line 276) | int ksprintf(char *out, const char *format, ...)
function klog_init (line 283) | int klog_init(void)
FILE: kernel/lm3s/lm3s6965evb.c
function exti_init (line 30) | int exti_init(void)
function exti_enable (line 35) | int exti_enable(void)
function exti_register (line 40) | int exti_register(void)
function gpio_init (line 45) | int gpio_init(void)
function gpio_create (line 50) | int gpio_create(struct module *mod, const struct gpio_config *gpio_config)
function usart_set_baudrate (line 56) | void usart_set_baudrate(uint32_t usart, uint32_t baud)
function usart_set_databits (line 63) | void usart_set_databits(uint32_t usart, int bits)
function usart_set_stopbits (line 70) | void usart_set_stopbits(uint32_t usart, enum usart_stopbits sb)
function usart_set_parity (line 77) | void usart_set_parity(uint32_t usart, enum usart_parity par)
function usart_set_mode (line 84) | void usart_set_mode(uint32_t usart, enum usart_mode mode)
function usart_set_flow_control (line 91) | void usart_set_flow_control(uint32_t usart, enum usart_flowcontrol fc)
function usart_enable (line 98) | void usart_enable(uint32_t usart)
function usart_disable (line 103) | void usart_disable(uint32_t usart)
type uart_config (line 110) | struct uart_config
function machine_init (line 134) | int machine_init(void)
FILE: kernel/locks.c
function _add_listener (line 34) | static void _add_listener(sem_t *s)
function _del_listener (line 60) | static void _del_listener(sem_t *s)
function sem_spinwait (line 72) | static int sem_spinwait(sem_t *s)
function sem_trywait (line 84) | int sem_trywait(sem_t *s)
function sem_wait (line 93) | int sem_wait(sem_t *s, struct timespec *timeout)
function sem_post (line 119) | int sem_post(sem_t *s)
function sem_destroy (line 143) | int sem_destroy(sem_t *sem)
function sem_init (line 151) | int sem_init(sem_t *s, int val)
function sys_sem_init_hdlr (line 166) | int sys_sem_init_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_sem_post_hdlr (line 177) | int sys_sem_post_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_sem_wait_hdlr (line 185) | int sys_sem_wait_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_sem_trywait_hdlr (line 193) | int sys_sem_trywait_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_sem_destroy_hdlr (line 201) | int sys_sem_destroy_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function suspend_on_sem_wait (line 209) | int suspend_on_sem_wait(sem_t *s)
function mutex_t (line 223) | mutex_t *mutex_init()
function mutex_destroy (line 239) | void mutex_destroy(mutex_t *s)
function mutex_spinlock (line 246) | static int mutex_spinlock(mutex_t *s)
function mutex_trylock (line 256) | int mutex_trylock(mutex_t *s)
function mutex_lock (line 265) | int mutex_lock(mutex_t *s)
function mutex_unlock (line 280) | int mutex_unlock(mutex_t *s)
function suspend_on_mutex_lock (line 307) | int suspend_on_mutex_lock(mutex_t *s)
function sys_mutex_init_hdlr (line 322) | int sys_mutex_init_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_mutex_lock_hdlr (line 327) | int sys_mutex_lock_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_mutex_unlock_hdlr (line 335) | int sys_mutex_unlock_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_mutex_destroy_hdlr (line 343) | int sys_mutex_destroy_hdlr(int arg1, int arg2, int arg3, int arg4, int a...
FILE: kernel/locks.h
type semaphore (line 3) | struct semaphore {
FILE: kernel/lpc17xx.h
type fnode (line 9) | struct fnode
type uart_addr (line 9) | struct uart_addr
FILE: kernel/lpc17xx/lpc1768mbed.c
type gpio_config (line 37) | struct gpio_config
type uart_config (line 45) | struct uart_config
function usart_set_baudrate (line 113) | void usart_set_baudrate(uint32_t usart, uint32_t baud)
function usart_set_databits (line 120) | void usart_set_databits(uint32_t usart, int bits)
function usart_set_stopbits (line 127) | void usart_set_stopbits(uint32_t usart, enum usart_stopbits sb)
function usart_set_parity (line 134) | void usart_set_parity(uint32_t usart, enum usart_parity par)
function usart_set_mode (line 141) | void usart_set_mode(uint32_t usart, enum usart_mode mode)
function usart_set_flow_control (line 148) | void usart_set_flow_control(uint32_t usart, enum usart_flowcontrol fc)
function exti_init (line 157) | int exti_init(void)
function exti_enable (line 162) | int exti_enable(void)
function exti_register (line 167) | int exti_register(void)
function usart_enable (line 172) | void usart_enable(uint32_t usart)
function usart_disable (line 177) | void usart_disable(uint32_t usart)
function machine_init (line 183) | int machine_init(void)
FILE: kernel/lpc17xx/lpc1769xpresso.c
type gpio_config (line 30) | struct gpio_config
type uart_config (line 35) | struct uart_config
function usart_set_baudrate (line 103) | void usart_set_baudrate(uint32_t usart, uint32_t baud)
function usart_set_databits (line 110) | void usart_set_databits(uint32_t usart, int bits)
function usart_set_stopbits (line 117) | void usart_set_stopbits(uint32_t usart, enum usart_stopbits sb)
function usart_set_parity (line 124) | void usart_set_parity(uint32_t usart, enum usart_parity par)
function usart_set_mode (line 131) | void usart_set_mode(uint32_t usart, enum usart_mode mode)
function usart_set_flow_control (line 138) | void usart_set_flow_control(uint32_t usart, enum usart_flowcontrol fc)
function exti_init (line 147) | int exti_init(void)
function exti_enable (line 152) | int exti_enable(void)
function exti_register (line 157) | int exti_register(void)
function usart_enable (line 162) | void usart_enable(uint32_t usart)
function usart_disable (line 167) | void usart_disable(uint32_t usart)
function machine_init (line 173) | int machine_init(void)
FILE: kernel/malloc.c
function MEMPOOL (line 46) | static inline int MEMPOOL(int x)
type f_malloc_block (line 64) | struct f_malloc_block {
type f_malloc_block (line 77) | struct f_malloc_block
type f_malloc_stats (line 80) | struct f_malloc_stats
type task (line 83) | struct task
type semaphore (line 84) | struct semaphore
type f_malloc_block (line 96) | struct f_malloc_block
type f_malloc_block (line 96) | struct f_malloc_block
type f_malloc_block (line 96) | struct f_malloc_block
type f_malloc_block (line 98) | struct f_malloc_block
type f_malloc_block (line 105) | struct f_malloc_block
type f_malloc_block (line 120) | struct f_malloc_block
type f_malloc_block (line 120) | struct f_malloc_block
type f_malloc_block (line 123) | struct f_malloc_block
type f_malloc_block (line 126) | struct f_malloc_block
type f_malloc_block (line 130) | struct f_malloc_block
type f_malloc_block (line 133) | struct f_malloc_block
type f_malloc_block (line 133) | struct f_malloc_block
function block_fits (line 143) | static int block_fits(struct f_malloc_block *blk, size_t size, int flags)
type f_malloc_block (line 162) | struct f_malloc_block
type f_malloc_block (line 162) | struct f_malloc_block
type f_malloc_block (line 164) | struct f_malloc_block
function f_compact (line 286) | static void f_compact(struct f_malloc_block *blk)
type f_malloc_block (line 332) | struct f_malloc_block
type f_malloc_block (line 339) | struct f_malloc_block
type f_malloc_block (line 339) | struct f_malloc_block
type f_malloc_block (line 374) | struct f_malloc_block
type f_malloc_block (line 375) | struct f_malloc_block
type f_malloc_block (line 375) | struct f_malloc_block
function f_proc_heap_free_pool (line 393) | static void f_proc_heap_free_pool(int pid, int mempool)
function f_proc_heap_free (line 407) | void f_proc_heap_free(int pid)
function f_proc_heap_count_pool (line 413) | uint32_t f_proc_heap_count_pool(int pid, int mempool)
function f_proc_heap_count (line 427) | uint32_t f_proc_heap_count(int pid)
type f_malloc_block (line 447) | struct f_malloc_block
type f_malloc_block (line 478) | struct f_malloc_block
type f_malloc_block (line 485) | struct f_malloc_block
type f_malloc_block (line 485) | struct f_malloc_block
type f_malloc_block (line 518) | struct f_malloc_block
type f_malloc_block (line 520) | struct f_malloc_block
function blk_rearrange (line 533) | static void blk_rearrange(void *arg)
function f_free (line 552) | void f_free(void * ptr)
function mem_stats_frag (line 578) | uint32_t mem_stats_frag(int pool)
function fmalloc_check_block_owner (line 594) | static int fmalloc_check_block_owner(int pool, const uint8_t *ptr)
function fmalloc_owner (line 614) | int fmalloc_owner(const void *_ptr)
function fmalloc_chown (line 624) | int fmalloc_chown(const void *ptr, uint16_t pid)
function mem_trylock (line 631) | int mem_trylock(void)
function mem_lock (line 636) | int mem_lock(void)
function mem_unlock (line 641) | void mem_unlock(void)
function sys_free_hdlr (line 657) | int sys_free_hdlr(void *addr)
function task_segfault (line 699) | int task_segfault(uint32_t mem, uint32_t inst, int flags) {
function print_malloc_stats (line 704) | void print_malloc_stats(void)
function print_malloc_entries (line 714) | void print_malloc_entries(void)
function main (line 735) | int main(int argc, char ** argv)
FILE: kernel/malloc.h
type f_malloc_stats (line 22) | struct f_malloc_stats {
FILE: kernel/module.c
type address_family (line 22) | struct address_family {
type module (line 28) | struct module
type address_family (line 29) | struct address_family
function register_module (line 31) | int register_module(struct module *m)
function unregister_module (line 38) | int unregister_module(struct module *m)
type module (line 47) | struct module
type module (line 49) | struct module
type module (line 58) | struct module
type address_family (line 60) | struct address_family
function register_addr_family (line 69) | int register_addr_family(struct module *m, uint16_t family)
function sys_read_hdlr (line 84) | int sys_read_hdlr(int fd, void *buf, int len)
function sys_write_hdlr (line 99) | int sys_write_hdlr(int fd, void *buf, int len)
function sys_socket_hdlr (line 116) | int sys_socket_hdlr(int family, int type, int proto)
function sys_bind_hdlr (line 124) | int sys_bind_hdlr(int sd, struct sockaddr_env *se)
function sys_listen_hdlr (line 135) | int sys_listen_hdlr(int sd, unsigned int backlog)
function sys_connect_hdlr (line 144) | int sys_connect_hdlr(int sd, struct sockaddr_env *se)
function sys_accept_hdlr (line 155) | int sys_accept_hdlr(int sd, struct sockaddr_env *se)
function sys_recvfrom_hdlr (line 170) | int sys_recvfrom_hdlr(int sd, void *buf, int len, int flags, struct sock...
function sys_sendto_hdlr (line 186) | int sys_sendto_hdlr(int sd, const void *buf, int len, int flags, struct ...
function sys_shutdown_hdlr (line 200) | int sys_shutdown_hdlr(int sd, int how)
function sys_setsockopt_hdlr (line 209) | int sys_setsockopt_hdlr(int sd, int level, int optname, void *optval, un...
function sys_getsockopt_hdlr (line 220) | int sys_getsockopt_hdlr(int sd, int level, int optname, void *optval, un...
function sys_getsockname_hdlr (line 233) | int sys_getsockname_hdlr(int sd, struct sockaddr_env *se)
function sys_getpeername_hdlr (line 244) | int sys_getpeername_hdlr(int sd, struct sockaddr_env *se)
FILE: kernel/mpu.c
function mpu_size (line 62) | uint32_t mpu_size(uint32_t size)
function mpu_present (line 101) | int mpu_present(void)
function mpu_enable (line 109) | int mpu_enable(void)
function mpu_disable (line 117) | int mpu_disable(void)
function mpu_select (line 125) | static void mpu_select(uint32_t region)
function mpu_setattr (line 130) | static void mpu_setattr(int region, uint32_t attr)
function mpu_setaddr (line 136) | static void mpu_setaddr(int region, uint32_t addr)
function mpu_init (line 143) | void mpu_init(void)
function mpu_task_on (line 179) | void mpu_task_on(void *stack)
FILE: kernel/net/if.h
type ifnet (line 42) | struct ifnet
type if_data (line 56) | struct if_data {
type if_msghdr (line 130) | struct if_msghdr {
type ifa_msghdr (line 144) | struct ifa_msghdr {
type ifma_msghdr (line 158) | struct ifma_msghdr {
type if_announcemsghdr (line 170) | struct if_announcemsghdr {
type ifreq (line 188) | struct ifreq {
type ifaliasreq (line 221) | struct ifaliasreq {
type ifmediareq (line 228) | struct ifmediareq {
type ifstat (line 246) | struct ifstat {
type ifconf (line 257) | struct ifconf {
type if_laddrreq (line 271) | struct if_laddrreq {
type if_nameindex (line 288) | struct if_nameindex {
type if_nameindex (line 296) | struct if_nameindex
type if_nameindex (line 297) | struct if_nameindex
type thread (line 302) | struct thread
FILE: kernel/net/pico_lock.c
function pico_lock_init (line 5) | void pico_lock_init(void)
function pico_lock (line 11) | void pico_lock(void)
function pico_trylock (line 17) | int pico_trylock(void)
function pico_trylock_kernel (line 25) | int pico_trylock_kernel(void)
function pico_unlock (line 32) | void pico_unlock(void)
FILE: kernel/net/route.h
type rtentry (line 7) | struct rtentry {
type in6_rtmsg (line 28) | struct in6_rtmsg {
FILE: kernel/nrf51/blenanov1_5.c
type gpio_config (line 27) | struct gpio_config
type uart_config (line 34) | struct uart_config
function machine_init (line 62) | int machine_init(void)
FILE: kernel/nrf52/blenanov2_0.c
type gpio_config (line 27) | struct gpio_config
type uart_config (line 34) | struct uart_config
function machine_init (line 62) | int machine_init(void)
FILE: kernel/null.h
type fnode (line 4) | struct fnode
FILE: kernel/pico_port.h
function pico_mutex_lock (line 21) | static void pico_mutex_lock(void *m) {
function pico_mutex_unlock (line 25) | static void pico_mutex_unlock(void *m) {
function pico_mutex_deinit (line 29) | static void pico_mutex_deinit(void *m) {
function pico_time (line 35) | static inline pico_time PICO_TIME_MS()
function pico_time (line 40) | static inline pico_time PICO_TIME()
function PICO_IDLE (line 45) | static inline void PICO_IDLE(void)
FILE: kernel/pipe.c
type module (line 31) | struct module
type pipe_priv (line 34) | struct pipe_priv {
type fnode (line 43) | struct fnode
function sys_pipe2_hdlr (line 47) | int sys_pipe2_hdlr(int paddr, int flags)
function pipe_poll (line 105) | static int pipe_poll(struct fnode *f, uint16_t events, uint16_t *revents)
function pipe_close (line 134) | static int pipe_close(struct fnode *f)
function pipe_read (line 169) | static int pipe_read(struct fnode *f, void *buf, unsigned int len)
function pipe_write (line 206) | static int pipe_write(struct fnode *f, const void *buf, unsigned int len)
function sys_pipe_init (line 249) | void sys_pipe_init(void)
function sys_pipe2_hdlr (line 263) | int sys_pipe2_hdlr(int paddr, int flags) {
FILE: kernel/scheduler.c
type extra_stack_frame (line 49) | struct extra_stack_frame
type nvic_stack_frame (line 50) | struct nvic_stack_frame
type extra_stack_frame (line 51) | struct extra_stack_frame
type nvic_stack_frame (line 52) | struct nvic_stack_frame
type extra_stack_frame (line 53) | struct extra_stack_frame
type strace (line 59) | struct strace {
type strace (line 65) | struct strace
function sys_register_handler (line 119) | int sys_register_handler(uint32_t n, int (*_sys_c)(uint32_t arg1, uint32...
type nvic_stack_frame (line 141) | struct __attribute__((packed)) nvic_stack_frame {
type extra_stack_frame (line 172) | struct __attribute__((packed)) extra_stack_frame {
type filedesc (line 210) | struct filedesc {
type filedesc_table (line 217) | struct filedesc_table {
type task_handler (line 223) | struct task_handler {
type thread_group (line 231) | struct thread_group {
type thread_group (line 239) | struct thread_group {
type thread_group (line 243) | struct thread_group
type task_block (line 246) | struct __attribute__((packed)) task_block {
type task (line 282) | struct __attribute__((packed)) task {
type task (line 287) | struct task
type task (line 288) | struct task
type task (line 288) | struct task
function tasklist_add (line 292) | static void tasklist_add(struct task **list, struct task *el)
function tasklist_del (line 298) | static int tasklist_del(struct task **list, struct task *togo)
function tasklist_len (line 317) | static int tasklist_len(struct task **list)
type task (line 329) | struct task
type task (line 329) | struct task
type task (line 331) | struct task
type task (line 340) | struct task
type task (line 341) | struct task
type task (line 342) | struct task
type task (line 343) | struct task
type task (line 344) | struct task
type task (line 345) | struct task
type task (line 346) | struct task
type task (line 351) | struct task
function idling_to_running (line 352) | static void idling_to_running(struct task *t)
function running_to_idling (line 358) | static void running_to_idling(struct task *t)
type task (line 366) | struct task
function task_destroy (line 374) | static void task_destroy(void *arg)
type task (line 475) | struct task
type task (line 476) | struct task
function __inl (line 478) | static __inl int in_kernel(void)
type task (line 483) | struct task
function task_get_timer_id (line 493) | int task_get_timer_id(void)
function task_set_timer_id (line 498) | void task_set_timer_id(int id)
function task_in_syscall (line 503) | int task_in_syscall(void)
function next_pid (line 509) | static int next_pid(void)
type filedesc_table (line 532) | struct filedesc_table
type task (line 532) | struct task
type filedesc_table (line 534) | struct filedesc_table
type filedesc_table (line 537) | struct filedesc_table
function ftable_destroy (line 545) | static void ftable_destroy(struct task *t)
function task_filedesc_add_to_task (line 558) | static int task_filedesc_add_to_task(struct task *t, struct fnode *f)
function task_filedesc_add (line 593) | int task_filedesc_add(struct fnode *f)
function task_filedesc_del_from_task (line 598) | static int task_filedesc_del_from_task(struct task *t, int fd)
function task_filedesc_del (line 627) | int task_filedesc_del(int fd)
function task_fd_setmask (line 632) | int task_fd_setmask(int fd, uint32_t mask)
function task_fd_getmask (line 657) | uint32_t task_fd_getmask(int fd)
function task_fd_set_flags (line 668) | uint32_t task_fd_set_flags(int fd, uint32_t flags)
function task_fd_get_flags (line 689) | uint32_t task_fd_get_flags(int fd)
function task_fd_set_off (line 707) | uint32_t task_fd_set_off(struct fnode *fno, uint32_t off)
function task_fd_get_off (line 729) | uint32_t task_fd_get_off(struct fnode *fno)
type fnode (line 745) | struct fnode
type task (line 747) | struct task
type filedesc_table (line 748) | struct filedesc_table
function task_fd_readable (line 765) | int task_fd_readable(int fd)
function task_fd_writable (line 772) | int task_fd_writable(int fd)
function sys_dup_hdlr (line 781) | int sys_dup_hdlr(int fd)
function sys_dup2_hdlr (line 795) | int sys_dup2_hdlr(int fd, int newfd)
type task (line 830) | struct task
type task_handler (line 830) | struct task_handler
function catch_signal (line 833) | static int catch_signal(struct task *t, int signo, sigset_t orig_mask)
function check_pending_signals (line 893) | static void check_pending_signals(struct task *t)
function add_handler (line 905) | static int add_handler(struct task *t, int signo, void (*hdlr)(int),
function del_handler (line 925) | static int del_handler(struct task *t, int signo)
function sig_hdlr_return (line 950) | static void sig_hdlr_return(uint32_t arg)
function sig_trampoline (line 962) | static void sig_trampoline(struct task *t, struct task_handler *h, int s...
function catch_signal (line 998) | static int catch_signal(struct task *t, int signo, sigset_t orig_mask)
type task (line 1007) | struct task
type task (line 1008) | struct task
type task (line 1009) | struct task
type task (line 1010) | struct task
function sys_sigaction_hdlr (line 1012) | int sys_sigaction_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_sigprocmask_hdlr (line 1052) | int sys_sigprocmask_hdlr(int how, const sigset_t *set, sigset_t *oldset)
function sys_sigsuspend_hdlr (line 1081) | int sys_sigsuspend_hdlr(const sigset_t *mask)
type fnode (line 1105) | struct fnode
function task_chdir (line 1109) | void task_chdir(struct fnode *f)
function __inl (line 1113) | static __inl void *msp_read(void)
function __inl (line 1120) | static __inl void *psp_read(void)
function scheduler_ntasks (line 1127) | int scheduler_ntasks(void)
function scheduler_task_state (line 1131) | int scheduler_task_state(int pid)
function scheduler_can_sleep (line 1142) | int scheduler_can_sleep(void)
function scheduler_stack_used (line 1150) | unsigned scheduler_stack_used(int pid)
type task (line 1164) | struct task
function scheduler_get_cur_pid (line 1175) | static uint16_t scheduler_get_cur_pid(void)
function this_task_getpid (line 1182) | uint16_t this_task_getpid(void)
function task_running (line 1186) | int task_running(void)
function task_timeslice (line 1190) | int task_timeslice(void)
function task_end (line 1194) | void task_end(void)
type task (line 1223) | struct task
function task_create_real (line 1256) | static void task_create_real(struct task *new, struct vfs_info *vfsi, vo...
function task_create (line 1318) | int task_create(struct vfs_info *vfsi, void *arg, unsigned int nice)
function scheduler_exec (line 1361) | int scheduler_exec(struct vfs_info *vfsi, void *args)
function sys_vfork_hdlr (line 1374) | int sys_vfork_hdlr(void)
type task (line 1452) | struct task
type task (line 1454) | struct task
type task (line 1455) | struct task
type thread_group (line 1456) | struct thread_group
function pthread_add (line 1484) | static int pthread_add(struct task *cur, struct task *new)
function __inl (line 1533) | static __inl int pthread_destroy_task(struct task *t)
function pthread_end (line 1554) | static void pthread_end(void)
function thread_create (line 1573) | static inline void thread_create(struct task *new,
function sys_pthread_create_hdlr (line 1607) | int sys_pthread_create_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3,
function sys_pthread_kill_hdlr (line 1662) | int sys_pthread_kill_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3,
type task (line 1681) | struct task
type task (line 1683) | struct task
type task (line 1683) | struct task
type task_block (line 1689) | struct task_block
function kthread_cancel (line 1707) | int kthread_cancel(struct task *t)
function sys_pthread_exit_hdlr (line 1720) | int sys_pthread_exit_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_join_hdlr (line 1731) | int sys_pthread_join_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_detach_hdlr (line 1763) | int sys_pthread_detach_hdlr(int arg1, int arg2, int arg3, int arg4, int ...
function sys_pthread_setcancelstate_hdlr (line 1775) | int sys_pthread_setcancelstate_hdlr(int arg1, int arg2, int arg3, int arg4,
function sys_pthread_cancel_hdlr (line 1818) | int sys_pthread_cancel_hdlr(int arg1, int arg2, int arg3, int arg4, int ...
function sys_pthread_self_hdlr (line 1849) | int sys_pthread_self_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_mutex_init_hdlr (line 1856) | int sys_pthread_mutex_init_hdlr(int arg1, int arg2, int arg3, int arg4,
function sys_pthread_mutex_destroy_hdlr (line 1869) | int sys_pthread_mutex_destroy_hdlr(int arg1, int arg2, int arg3, int arg4,
function sys_pthread_mutex_lock_hdlr (line 1880) | int sys_pthread_mutex_lock_hdlr(int arg1, int arg2, int arg3, int arg4,
function sys_pthread_mutex_trylock_hdlr (line 1895) | int sys_pthread_mutex_trylock_hdlr(int arg1, int arg2, int arg3, int arg4,
function sys_pthread_mutex_unlock_hdlr (line 1910) | int sys_pthread_mutex_unlock_hdlr(int arg1, int arg2, int arg3, int arg4,
function sys_pthread_key_create_hdlr (line 1920) | int sys_pthread_key_create_hdlr(int arg1, int arg2, int arg3, int arg4, ...
function sys_pthread_setspecific_hdlr (line 1933) | int sys_pthread_setspecific_hdlr(int arg1, int arg2, int arg3, int arg4,...
function sys_pthread_getspecific_hdlr (line 1943) | int sys_pthread_getspecific_hdlr(int arg1, int arg2, int arg3, int arg4,...
function sys_pthread_create_hdlr (line 1953) | int sys_pthread_create_hdlr(int arg1, int arg2, int arg3, int arg4, int ...
function sys_pthread_exit_hdlr (line 1958) | int sys_pthread_exit_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_join_hdlr (line 1964) | int sys_pthread_join_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_detach_hdlr (line 1968) | int sys_pthread_detach_hdlr(int arg1, int arg2, int arg3, int arg4, int ...
function sys_pthread_cancel_hdlr (line 1972) | int sys_pthread_cancel_hdlr(int arg1, int arg2, int arg3, int arg4, int ...
function sys_pthread_self_hdlr (line 1976) | int sys_pthread_self_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_setcancelstate_hdlr (line 1980) | int sys_pthread_setcancelstate_hdlr(int arg1, int arg2, int arg3, int ar...
function sys_pthread_mutex_init_hdlr (line 1984) | int sys_pthread_mutex_init_hdlr(int arg1, int arg2, int arg3, int arg4, ...
function sys_pthread_mutex_destroy_hdlr (line 1988) | int sys_pthread_mutex_destroy_hdlr(int arg1, int arg2, int arg3, int arg...
function sys_pthread_mutex_lock_hdlr (line 1992) | int sys_pthread_mutex_lock_hdlr(int arg1, int arg2, int arg3, int arg4, ...
function sys_pthread_mutex_trylock_hdlr (line 1996) | int sys_pthread_mutex_trylock_hdlr(int arg1, int arg2, int arg3, int arg...
function sys_pthread_mutex_unlock_hdlr (line 2000) | int sys_pthread_mutex_unlock_hdlr(int arg1, int arg2, int arg3, int arg4...
function sys_pthread_kill_hdlr (line 2004) | int sys_pthread_kill_hdlr(int arg1, int arg2, int arg3, int arg4, int arg5)
function sys_pthread_key_create_hdlr (line 2008) | int sys_pthread_key_create_hdlr(int arg1, int arg2, int arg3, int arg4, ...
function sys_pthread_setspecific_hdlr (line 2012) | int sys_pthread_setspecific_hdlr(int arg1, int arg2, int arg3, int arg4,...
function sys_pthread_getspecific_hdlr (line 2016) | int sys_pthread_getspecific_hdlr(int arg1, int arg2, int arg3, int arg4,...
function __naked (line 2033) | static __naked void save_kernel_context(void)
function __naked (line 2054) | static __naked void save_task_context(void)
function __naked (line 2077) | static __naked void restore_kernel_context(void)
function __naked (line 2095) | static __naked void restore_task_context(void)
function __inl (line 2113) | static __inl void task_switch(void)
function pend_sv_handler (line 2140) | void __naked pend_sv_handler(void)
function kernel_task_init (line 2215) | void kernel_task_init(void)
function task_suspend_to (line 2241) | static void task_suspend_to(int newstate)
function task_suspend (line 2255) | void task_suspend(void)
function task_stop (line 2260) | void task_stop(struct task *t)
function task_hit_breakpoint (line 2272) | void task_hit_breakpoint(struct task *t)
function task_preempt (line 2280) | void task_preempt(void)
function task_preempt_all (line 2286) | void task_preempt_all(void)
function task_resume_real (line 2298) | static void task_resume_real(struct task *t, int lock)
function task_resume_lock (line 2312) | void task_resume_lock(struct task *t)
function task_resume (line 2317) | void task_resume(struct task *t)
function task_wakeup (line 2322) | void task_wakeup(struct task *t)
function task_continue (line 2329) | void task_continue(struct task *t)
function task_resume_vfork (line 2337) | static void task_resume_vfork(struct task *t)
function task_deliver_sigchld (line 2345) | void task_deliver_sigchld(void *arg)
function task_deliver_sigtrap (line 2352) | void task_deliver_sigtrap(void *arg)
function destroy_thread_group (line 2360) | static void destroy_thread_group(struct thread_group *group, uint16_t tid)
function task_terminate (line 2383) | void task_terminate(struct task *t)
function scheduler_get_nice (line 2419) | int scheduler_get_nice(int pid)
function sys_getpid_hdlr (line 2431) | int sys_getpid_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_...
function sys_getppid_hdlr (line 2439) | int sys_getppid_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32...
function sleepy_task_wakeup (line 2447) | void sleepy_task_wakeup(uint32_t now, void *arg)
function sys_sleep_hdlr (line 2456) | int sys_sleep_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t...
function kthread_sleep_ms (line 2476) | void kthread_sleep_ms(uint32_t ms)
function alarm_task (line 2484) | void alarm_task(uint32_t now, void *arg)
function sys_alarm_hdlr (line 2493) | int sys_alarm_hdlr(uint32_t arg1)
function sys_ualarm_hdlr (line 2508) | int sys_ualarm_hdlr(uint32_t arg1, uint32_t arg2)
function task_yield (line 2523) | void task_yield(void)
function kthread_yield (line 2529) | void __naked kthread_yield(void)
function sys_sched_yield_hdlr (line 2540) | int sys_sched_yield_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3,
function sys_poll_hdlr (line 2547) | int sys_poll_hdlr(uint32_t arg1, uint32_t arg2, int arg3)
function sys_waitpid_hdlr (line 2604) | int sys_waitpid_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3)
type __ptrace_request (line 2682) | enum __ptrace_request {
function ptrace_getregs (line 2701) | int ptrace_getregs(struct task *t, struct user *u)
function ptrace_peekuser (line 2724) | int ptrace_peekuser(struct task *t, uint32_t addr)
function ptrace_pokeuser (line 2732) | int ptrace_pokeuser(struct task *t, uint32_t addr, uint32_t data)
function ptrace_setregs (line 2767) | int ptrace_setregs(struct task *t, uint32_t *regs)
function sys_ptrace_hdlr (line 2776) | int sys_ptrace_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_...
function sys_setpriority_hdlr (line 2875) | int sys_setpriority_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3,
function sys_getpriority_hdlr (line 2893) | int sys_getpriority_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3,
function sys_kill_hdlr (line 2909) | int sys_kill_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function task_kill (line 2920) | int task_kill(int pid, int signal)
function sys_exit_hdlr (line 2927) | int sys_exit_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function sys_setsid_hdlr (line 2934) | int sys_setsid_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_...
function task_segfault (line 2957) | int task_segfault(uint32_t address, uint32_t instruction, int flags)
function task_ptr_valid (line 2988) | int task_ptr_valid(const void *ptr)
type nvic_stack_frame (line 3015) | struct nvic_stack_frame
function sv_call_handler (line 3023) | int __naked sv_call_handler(void)
FILE: kernel/stm32f4/stm32f407discovery.c
type gpio_config (line 61) | struct gpio_config
type gpio_config (line 88) | struct gpio_config
type usb_pio_config_fs (line 97) | struct usb_pio_config_fs
type usb_config (line 121) | struct usb_config
type gpio_config (line 128) | struct gpio_config
type eth_config (line 141) | struct eth_config
type i2c_config (line 155) | struct i2c_config
type spi_config (line 216) | struct spi_config
type uart_config (line 356) | struct uart_config
type sdio_config (line 481) | struct sdio_config
type gpio_config (line 546) | struct gpio_config
function machine_init (line 554) | int machine_init(void)
FILE: kernel/stm32f4/stm32f407diymore.c
type gpio_config (line 61) | struct gpio_config
type gpio_config (line 69) | struct gpio_config
type usb_pio_config_fs (line 78) | struct usb_pio_config_fs
type usb_config (line 102) | struct usb_config
type i2c_config (line 109) | struct i2c_config
type spi_config (line 170) | struct spi_config
type uart_config (line 310) | struct uart_config
function machine_init (line 373) | int machine_init(void)
FILE: kernel/stm32f4/stm32f411nucleo.c
type gpio_config (line 56) | struct gpio_config
type gpio_config (line 63) | struct gpio_config
type usb_pio_config_fs (line 72) | struct usb_pio_config_fs
type usb_config (line 96) | struct usb_config
type i2c_config (line 103) | struct i2c_config
type uart_config (line 279) | struct uart_config
type spi_config (line 371) | struct spi_config
function machine_init (line 511) | int machine_init(void)
FILE: kernel/stm32f4/stm32f429discovery.c
type gpio_config (line 51) | struct gpio_config
type gpio_config (line 58) | struct gpio_config
type uart_config (line 66) | struct uart_config
type i2c_config (line 129) | struct i2c_config
type spi_config (line 189) | struct spi_config
type ts_config (line 250) | struct ts_config
function machine_init (line 262) | int machine_init(void)
FILE: kernel/stm32f4/stm32f446nucleo.c
type gpio_addr (line 37) | struct gpio_addr
type uart_addr (line 83) | struct uart_addr
type rng_addr (line 141) | struct rng_addr
type sdio_config (line 156) | struct sdio_config
function machine_init (line 227) | void machine_init(struct fnode * dev)
FILE: kernel/stm32f4/stm32f4x1discovery.c
type gpio_config (line 46) | struct gpio_config
type gpio_config (line 52) | struct gpio_config
type uart_config (line 56) | struct uart_config
type spi_addr (line 155) | struct spi_addr
type i2c_addr (line 207) | struct i2c_addr
type adc_config (line 253) | struct adc_config
type lsm303dlhc_addr (line 281) | struct lsm303dlhc_addr
type l3gd20_addr (line 296) | struct l3gd20_addr
function machine_init (line 309) | int machine_init(void)
FILE: kernel/stm32f4/stm32f4xxpyboard.c
type gpio_config (line 58) | struct gpio_config
type gpio_config (line 85) | struct gpio_config
type usb_pio_config_fs (line 94) | struct usb_pio_config_fs
type usb_config (line 118) | struct usb_config
type i2c_config (line 125) | struct i2c_config
type uart_config (line 244) | struct uart_config
type sdio_config (line 397) | struct sdio_config
function machine_init (line 468) | int machine_init(void)
FILE: kernel/stm32f7/stm32f746discovery.c
type gpio_config (line 46) | struct gpio_config
type gpio_config (line 54) | struct gpio_config
type uart_config (line 63) | struct uart_config
type sdio_config (line 131) | struct sdio_config
type gpio_config (line 202) | struct gpio_config
type eth_config (line 215) | struct eth_config
type gpio_config (line 217) | struct gpio_config
type usb_pio_config_fs (line 222) | struct usb_pio_config_fs
type usb_pio_config_hs (line 252) | struct usb_pio_config_hs
type usb_config (line 269) | struct usb_config
type usb_config (line 275) | struct usb_config
type usb_config (line 281) | struct usb_config
type i2c_config (line 298) | struct i2c_config
function machine_init (line 417) | int machine_init(void)
FILE: kernel/stm32f7/stm32f746nucleo-144.c
type gpio_config (line 42) | struct gpio_config
type gpio_config (line 50) | struct gpio_config
type gpio_config (line 57) | struct gpio_config
type gpio_config (line 65) | struct gpio_config
type uart_config (line 74) | struct uart_config
type sdio_config (line 170) | struct sdio_config
type gpio_config (line 235) | struct gpio_config
type eth_config (line 248) | struct eth_config
type usb_pio_config_fs (line 260) | struct usb_pio_config_fs
type usb_config (line 284) | struct usb_config
function machine_init (line 290) | int machine_init(void)
FILE: kernel/stm32f7/stm32f769discovery.c
type gpio_config (line 42) | struct gpio_config
type gpio_config (line 59) | struct gpio_config
type uart_config (line 68) | struct uart_config
type sdio_config (line 158) | struct sdio_config
type gpio_config (line 229) | struct gpio_config
type eth_config (line 242) | struct eth_config
type gpio_config (line 244) | struct gpio_config
function machine_init (line 257) | int machine_init(void)
FILE: kernel/string.c
function strcmp (line 48) | int strcmp(const char *s1, const char *s2)
function strcasecmp (line 61) | int strcasecmp(const char *s1, const char *s2)
function strlen (line 78) | size_t strlen(const char *s)
function strncmp (line 104) | int strncmp(const char *s1, const char *s2, size_t n)
function memcmp (line 160) | int memcmp(const void *_s1, const void *_s2, size_t n)
FILE: kernel/sys.c
type timeval_kernel (line 33) | struct timeval_kernel
function sys_suspend_hdlr (line 41) | int sys_suspend_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32...
function sys_standby_hdlr (line 49) | int sys_standby_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32...
function sys_suspend_hdlr (line 57) | int sys_suspend_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32...
function sys_standby_hdlr (line 62) | int sys_standby_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32...
function sys_ptsname_hdlr (line 69) | int sys_ptsname_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32...
function sys_test_hdlr (line 75) | int sys_test_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function sys_thread_create_hdlr (line 80) | int sys_thread_create_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, ...
function sys_thread_join_hdlr (line 86) | int sys_thread_join_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, ui...
function sys_execb_hdlr (line 92) | int sys_execb_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t...
function sys_clock_gettime_hdlr (line 99) | int sys_clock_gettime_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, ...
function sys_clock_settime_hdlr (line 114) | int sys_clock_settime_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, ...
function sys_reboot_hdlr (line 128) | int sys_reboot_hdlr(uint32_t fadeoff, int cmd, uint32_t interval)
type utsname (line 149) | struct utsname {
type utsname (line 158) | struct utsname
function sys_uname_hdlr (line 160) | int sys_uname_hdlr( uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_...
FILE: kernel/systick.c
function frosted_scheduler_on (line 38) | void frosted_scheduler_on(void)
function frosted_scheduler_off (line 54) | void frosted_scheduler_off(void)
function SysTick_Hook (line 59) | void __attribute__((weak)) SysTick_Hook(void)
type ktimer (line 63) | typedef struct ktimer {
type heap_ktimer (line 70) | struct heap_ktimer
function ktimer_init (line 73) | void ktimer_init(void)
function ktimer_add (line 79) | int ktimer_add(uint32_t count, void (*handler)(uint32_t, void *), void *...
function ktimer_del (line 96) | int ktimer_del(int tid)
function ktimer_expired (line 109) | static inline int ktimer_expired(void)
function ktimers_check_tasklet (line 118) | static void ktimers_check_tasklet(void *arg)
function sys_tick_handler (line 147) | void sys_tick_handler(void)
FILE: kernel/tasklet.c
type tasklet (line 25) | struct tasklet {
type tasklet (line 30) | struct tasklet
function tasklet_add (line 35) | void tasklet_add(void (*exe)(void*), void *arg)
function check_tasklets (line 56) | void check_tasklets(void)
FILE: kernel/term.c
type module (line 24) | struct module
type fnode (line 26) | struct fnode
function sys_tcgetattr_hdlr (line 32) | int sys_tcgetattr_hdlr(int arg1, int arg2)
function sys_tcsetattr_hdlr (line 45) | int sys_tcsetattr_hdlr(int arg1, int arg2, int arg3)
function sys_tcsendbreak_hdlr (line 59) | int sys_tcsendbreak_hdlr(int arg1, int arg2)
FILE: kernel/vfs.c
type mountpoint (line 29) | struct mountpoint
type fnode (line 34) | struct fnode
function basename_r (line 37) | static void basename_r(const char *path, char *res)
type fnode (line 68) | struct fnode
type fnode (line 68) | struct fnode
function _fno_fullpath (line 70) | static int _fno_fullpath(struct fnode *f, char *dst, char **p, int len)
function fno_fullpath (line 100) | int fno_fullpath(struct fnode *f, char *dst, int len)
function path_abs (line 120) | static int path_abs(char *src, char *dst, int len)
type fnode (line 138) | struct fnode
type module (line 141) | struct module
type fnode (line 142) | struct fnode
type fnode (line 143) | struct fnode
type fnode (line 163) | struct fnode
type fnode (line 165) | struct fnode
type fnode (line 166) | struct fnode
function vfs_symlink (line 194) | int vfs_symlink(char *file, char *link)
function mkdir_links (line 201) | static void mkdir_links(struct fnode *fno)
type fnode (line 216) | struct fnode
type fnode (line 218) | struct fnode
function path_check (line 256) | static int path_check(const char *path, const char *dirname)
type fnode (line 278) | struct fnode
type fnode (line 278) | struct fnode
type fnode (line 280) | struct fnode
type fnode (line 315) | struct fnode
type fnode (line 318) | struct fnode
type fnode (line 348) | struct fnode
type fnode (line 353) | struct fnode
type module (line 353) | struct module
type fnode (line 353) | struct fnode
type fnode (line 355) | struct fnode
type fnode (line 355) | struct fnode
type fnode (line 380) | struct fnode
type module (line 380) | struct module
type fnode (line 380) | struct fnode
type fnode (line 382) | struct fnode
type fnode (line 389) | struct fnode
type module (line 389) | struct module
type fnode (line 389) | struct fnode
type fnode (line 391) | struct fnode
type fnode (line 398) | struct fnode
type module (line 398) | struct module
type fnode (line 398) | struct fnode
type fnode (line 400) | struct fnode
type fnode (line 407) | struct fnode
type module (line 407) | struct module
type fnode (line 407) | struct fnode
type fnode (line 409) | struct fnode
function fno_unlink (line 417) | void fno_unlink(struct fnode *fno)
function sys_readlink_hdlr (line 451) | int sys_readlink_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint3...
function sys_exec_hdlr (line 475) | int sys_exec_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function sys_open_hdlr (line 493) | int sys_open_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function sys_close_hdlr (line 568) | int sys_close_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t...
function sys_seek_hdlr (line 581) | int sys_seek_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function sys_ioctl_hdlr (line 591) | int sys_ioctl_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t...
function sys_link_hdlr (line 601) | int sys_link_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t ...
function sys_mkdir_hdlr (line 613) | int sys_mkdir_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t...
function sys_unlink_hdlr (line 626) | int sys_unlink_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_...
function sys_opendir_hdlr (line 642) | int sys_opendir_hdlr(uint32_t arg1)
function sys_readdir_hdlr (line 660) | int sys_readdir_hdlr(uint32_t arg1, uint32_t arg2)
function sys_closedir_hdlr (line 683) | int sys_closedir_hdlr(uint32_t arg1)
function stat_hdlr (line 692) | static int stat_hdlr(char *path, struct stat *st)
function sys_stat_hdlr (line 722) | int sys_stat_hdlr(char *arg1, struct stat *arg2)
function sys_fstat_hdlr (line 731) | int sys_fstat_hdlr(uint32_t arg1, struct stat *arg2)
function sys_lstat_hdlr (line 755) | int sys_lstat_hdlr(char *arg1, struct stat *arg2)
function vfs_truncate (line 790) | int vfs_truncate(struct fnode *fno, unsigned size)
function sys_ftruncate_hdlr (line 801) | int sys_ftruncate_hdlr(uint32_t arg1, unsigned arg2)
function sys_truncate_hdlr (line 807) | int sys_truncate_hdlr(char *arg1, unsigned arg2)
function sys_chdir_hdlr (line 818) | int sys_chdir_hdlr(char *arg1)
function sys_isatty_hdlr (line 834) | int sys_isatty_hdlr(uint32_t arg1)
function sys_ttyname_hdlr (line 842) | int sys_ttyname_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3)
function sys_getcwd_hdlr (line 854) | int sys_getcwd_hdlr(uint32_t arg1, uint32_t arg2)
function devnull_init (line 865) | void __attribute__((weak)) devnull_init(struct fnode *dev)
function memfs_init (line 870) | void __attribute__((weak)) memfs_init(void)
function xipfs_init (line 875) | void __attribute__((weak)) xipfs_init(void)
function sysfs_init (line 880) | void __attribute__((weak)) sysfs_init(void)
function fatfs_init (line 885) | void __attribute__((weak)) fatfs_init(void)
function devgpio_init (line 890) | void __attribute__((weak)) devgpio_init(struct fnode *dev)
function devuart_init (line 896) | void __attribute__((weak)) devuart_init(struct fnode *dev)
function devspi_init (line 901) | void __attribute__((weak)) devspi_init(struct fnode *dev)
function vfs_mount (line 906) | int vfs_mount(char *source, char *target, char *module, uint32_t flags, ...
function vfs_umount (line 926) | int vfs_umount(char *target, uint32_t flags)
function sys_mount_hdlr (line 957) | int sys_mount_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_t...
function sys_umount_hdlr (line 969) | int sys_umount_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3, uint32_...
function sys_fcntl_hdlr (line 979) | int sys_fcntl_hdlr(uint32_t arg1, uint32_t arg2, uint32_t arg3)
function vfs_init (line 996) | void vfs_init(void)
FILE: kernel/vfs.h
type vfs_info (line 8) | struct vfs_info {
Condensed preview — 224 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,660K chars).
[
{
"path": ".gitignore",
"chars": 440,
"preview": "# Object files\n*.o\n*.ko\n*.obj\n*.elf\n*.bin\n\n# Precompiled Headers\n*.gch\n*.pch\n\n# Libraries\n*.lib\n*.a\n*.la\n*.lo\n\n# Shared "
},
{
"path": ".gitmodules",
"chars": 603,
"preview": "[submodule \"apps/busybox\"]\n\tpath = apps/busybox\n\turl = https://github.com/insane-adding-machines/busybox.git\n[submodule "
},
{
"path": ".project",
"chars": 808,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<projectDescription>\n\t<name>Frosted</name>\n\t<comment></comment>\n\t<projects>\n\t</pr"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 3541,
"preview": "Code of Conduct\n\nInsane-adding-machines is a community organization, whose purpose is to promote the use of Free Softwar"
},
{
"path": "CONTRIBUTING.md",
"chars": 1558,
"preview": "Contributing to Frosted\n-----------------\n\nFrosted is a community project with no strong copyright enforcement.\nYou are "
},
{
"path": "LICENSE",
"chars": 18047,
"preview": " GNU GENERAL PUBLIC LICENSE\n Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
},
{
"path": "Makefile",
"chars": 11254,
"preview": "-include kconfig/.config\nFROSTED:=$(PWD)\nFLASH_ORIGIN?=0x0\nCFLAGS+=-DFLASH_ORIGIN=$(FLASH_ORIGIN)\n\nifneq ($(V),1)\n Q:="
},
{
"path": "README.md",
"chars": 244,
"preview": "# Frosted :snowman:\n\n## We moved to gitlab!\n\nPlease visit [Frosted OS](https://gitlab.com/insane-adding-machines/frosted"
},
{
"path": "defconfig/lpc1769.config",
"chars": 1228,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/lpc17xx.config",
"chars": 1241,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/qemu-orig.config",
"chars": 1073,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/qemu.config",
"chars": 1051,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/qemunet.config",
"chars": 1461,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/stm32f407-discovery.config",
"chars": 1777,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/stm32f429i-discovery.config",
"chars": 1720,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/stm32f746-discovery.config",
"chars": 1888,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/stm32f746-nucleo.config",
"chars": 1410,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "defconfig/stm32f769-discovery.config",
"chars": 1677,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Compiler options\n#\nGDB_CFLAG=y\nOPTI"
},
{
"path": "gdbinit.bflt",
"chars": 522,
"preview": " tar ext :3333\n monitor reset\n layout src\n symbol-file\n file kernel.elf\n add-symbol-file ./frosted-mini-userspace-bflt/i"
},
{
"path": "gdbinit.mini",
"chars": 109,
"preview": " tar ext :3333\n monitor reset\n layout src\n symbol-file\n file kernel.elf\n mon reset\n mon halt\n stepi\n focus c\n"
},
{
"path": "include/frosted_api.h",
"chars": 1587,
"preview": "#ifndef INC_FROSTED_API\n#define INC_FROSTED_API\n#include \"stdint.h\"\n\n#define INIT __attribute__((section(\".init\")))\n\n/* "
},
{
"path": "kconfig/.gitignore",
"chars": 167,
"preview": "#\n# Generated files\n#\nconfig*\n*.lex.c\n*.tab.c\n*.tab.h\nzconf.hash.c\n*.moc\ngconf.glade.h\n*.pot\n*.mo\n\n#\n# configuration pro"
},
{
"path": "kconfig/Kconfig",
"chars": 67,
"preview": "mainmenu \"FROSTED Kernel Configuration\"\nsource ../kernel/Kconfig\n\n\n"
},
{
"path": "kconfig/Makefile",
"chars": 11410,
"preview": "# ===========================================================================\n# Kernel configuration targets\n# These tar"
},
{
"path": "kconfig/Makefile.frosted",
"chars": 2020,
"preview": "src := .\ntop_srcdir=../../\ntop_builddir=../../\nsrctree := .\nobj ?= .\n\ninclude Makefile\n#HOSTCFLAGS+=-Dinline=\"\" -include"
},
{
"path": "kconfig/POTFILES.in",
"chars": 361,
"preview": "scripts/kconfig/lxdialog/checklist.c\nscripts/kconfig/lxdialog/inputbox.c\nscripts/kconfig/lxdialog/menubox.c\nscripts/kcon"
},
{
"path": "kconfig/STM32F4x1Discovery.cfg",
"chars": 1021,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Platform Selection\n#\n# ARCH_LM3S is"
},
{
"path": "kconfig/check.sh",
"chars": 215,
"preview": "#!/bin/sh\n# Needed for systems without gettext\n$* -x c -o /dev/null - > /dev/null 2>&1 << EOF\n#include <libintl.h>\nint m"
},
{
"path": "kconfig/conf.c",
"chars": 16008,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#inc"
},
{
"path": "kconfig/confdata.c",
"chars": 26063,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#inc"
},
{
"path": "kconfig/expr.c",
"chars": 27155,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#inc"
},
{
"path": "kconfig/expr.h",
"chars": 7489,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#ifn"
},
{
"path": "kconfig/frosted.conf",
"chars": 0,
"preview": ""
},
{
"path": "kconfig/gconf.c",
"chars": 39759,
"preview": "/* Hey EMACS -*- linux-c -*- */\n/*\n *\n * Copyright (C) 2002-2003 Romain Lievin <roms@tilp.info>\n * Released under the te"
},
{
"path": "kconfig/gconf.glade",
"chars": 25642,
"preview": "<?xml version=\"1.0\" standalone=\"no\"?> <!--*- mode: xml -*-->\n\n<glade-interface>\n\n<widget class=\"GtkWindow\" id=\"window1\">"
},
{
"path": "kconfig/images.c",
"chars": 6565,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\nstat"
},
{
"path": "kconfig/kxgettext.c",
"chars": 4196,
"preview": "/*\n * Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2005\n *\n * Released under the terms of the GNU GPL v2.0\n */\n\n#in"
},
{
"path": "kconfig/list.h",
"chars": 3716,
"preview": "#ifndef LIST_H\n#define LIST_H\n\n/*\n * Copied from include/linux/...\n */\n\n#undef offsetof\n#define offsetof(TYPE, MEMBER) ("
},
{
"path": "kconfig/lkc.h",
"chars": 5022,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#ifn"
},
{
"path": "kconfig/lkc_proto.h",
"chars": 2538,
"preview": "#include <stdarg.h>\n\n/* confdata.c */\nP(conf_parse,void,(const char *name));\nP(conf_read,int,(const char *name));\nP(conf"
},
{
"path": "kconfig/lpc17xx.cfg",
"chars": 709,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Platform Selection\n#\n# ARCH_LM3S is"
},
{
"path": "kconfig/mconf.c",
"chars": 28164,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n *\n * Int"
},
{
"path": "kconfig/menu.c",
"chars": 17265,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#inc"
},
{
"path": "kconfig/merge_config.sh",
"chars": 3844,
"preview": "#!/bin/sh\n# merge_config.sh - Takes a list of config fragment values, and merges\n# them one by one. Provides warnings "
},
{
"path": "kconfig/nconf.c",
"chars": 39218,
"preview": "/*\n * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?\n * Released under the terms of the GNU GPL v2.0.\n *\n * Deri"
},
{
"path": "kconfig/nconf.gui.c",
"chars": 14893,
"preview": "/*\n * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?\n * Released under the terms of the GNU GPL v2.0.\n *\n * Deri"
},
{
"path": "kconfig/nconf.h",
"chars": 1916,
"preview": "/*\n * Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?\n * Released under the terms of the GNU GPL v2.0.\n *\n * Deri"
},
{
"path": "kconfig/qconf.cc",
"chars": 44484,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#inc"
},
{
"path": "kconfig/qconf.h",
"chars": 7951,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#if "
},
{
"path": "kconfig/qemu2.cfg",
"chars": 808,
"preview": "#\n# Automatically generated file; DO NOT EDIT.\n# FROSTED Kernel Configuration\n#\n\n#\n# Platform Selection\n#\nARCH_LM3S=y\n# "
},
{
"path": "kconfig/streamline_config.pl",
"chars": 15192,
"preview": "#!/usr/bin/perl -w\n#\n# Copyright 2005-2009 - Steven Rostedt\n# Licensed under the terms of the GNU GPL License version 2\n"
},
{
"path": "kconfig/symbol.c",
"chars": 29829,
"preview": "/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#inc"
},
{
"path": "kconfig/util.c",
"chars": 3158,
"preview": "/*\n * Copyright (C) 2002-2005 Roman Zippel <zippel@linux-m68k.org>\n * Copyright (C) 2002-2005 Sam Ravnborg <sam@ravnborg"
},
{
"path": "kconfig/zconf.gperf",
"chars": 1428,
"preview": "%language=ANSI-C\n%define hash-function-name kconf_id_hash\n%define lookup-function-name kconf_id_lookup\n%define string-po"
},
{
"path": "kconfig/zconf.hash.c_shipped",
"chars": 12255,
"preview": "/* ANSI-C code produced by gperf version 3.0.4 */\n/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_s"
},
{
"path": "kconfig/zconf.l",
"chars": 6698,
"preview": "%option nostdinit noyywrap never-interactive full ecs\n%option 8bit nodefault perf-report perf-report\n%option noinput\n%x "
},
{
"path": "kconfig/zconf.lex.c_shipped",
"chars": 58280,
"preview": "\n#line 3 \"scripts/kconfig/zconf.lex.c_shipped\"\n\n#define YY_INT_ALIGNED short int\n\n/* A lexical scanner generated by fle"
},
{
"path": "kconfig/zconf.tab.c_shipped",
"chars": 75200,
"preview": "/* A Bison parser, made by GNU Bison 2.5. */\n\n/* Bison implementation for Yacc-like parsers in C\n \n Copyright (C"
},
{
"path": "kconfig/zconf.y",
"chars": 15402,
"preview": "%{\n/*\n * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>\n * Released under the terms of the GNU GPL v2.0.\n */\n\n#"
},
{
"path": "kernel/Kconfig",
"chars": 16787,
"preview": "menu \"Compiler options\"\n config GDB_CFLAG\n bool \"Keep debugging symbols\"\n default y\n\n choice\n prompt \"Com"
},
{
"path": "kernel/adc.h",
"chars": 364,
"preview": "#ifndef INC_ADC\n#define INC_ADC\n\n#define NUM_ADC_CHANNELS 16\n\nstruct adc_config {\n uint32_t base;\n uint32_t irq"
},
{
"path": "kernel/bflt.c",
"chars": 13151,
"preview": "/* \n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n *"
},
{
"path": "kernel/bflt.h",
"chars": 295,
"preview": " /*\n */\n\n#include <frosted_api.h>\n#include \"flat.h\"\n\n#ifndef _BFLT_H_\n#define _BFLT_H_\n\nint bflt_load(uint8_t* from, voi"
},
{
"path": "kernel/cdc_acm.h",
"chars": 225,
"preview": "#ifndef INC_CDC_ACM_H\n#define INC_CDC_ACM_H\n\n\nstruct cdcacm_addr {\n const char * name;\n const char * usb_name;\n};\n"
},
{
"path": "kernel/cdc_ecm.h",
"chars": 143,
"preview": "#ifndef INC_CDC_ECM_H\n#define INC_CDC_ECM_H\n\n#define USBETH_MAX_FRAME 1514\n\n\n\nvoid cdcecm_init_init(const unsigned char "
},
{
"path": "kernel/cirbuf.c",
"chars": 3961,
"preview": "/* \n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n *"
},
{
"path": "kernel/cirbuf.h",
"chars": 583,
"preview": "#include \"frosted.h\"\n\n#ifndef CIR_BUF_H\n#define CIR_BUF_H\n\nstruct cirbuf;\n\nstruct cirbuf * cirbuf_create(int size);\n/* 0"
},
{
"path": "kernel/crypto/aes.c",
"chars": 44790,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/crypto/aes.h",
"chars": 852,
"preview": "#ifndef CRYPTO_AES_H_\n#define CRYPTO_AES_H_\n\n#include \"crypto/misc.h\"\n\nenum {\n\tAES_ENC_TYPE = 1, /* cipher unique ty"
},
{
"path": "kernel/crypto/misc.c",
"chars": 1786,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/crypto/misc.h",
"chars": 626,
"preview": "#ifndef CRYPTO_MISC_H_\n#define CRYPTO_MISC_H_\n\n#define XMEMCPY(d,s,l) memcpy((d),(s),(l))\n#define XMEMSET(b,c,l) m"
},
{
"path": "kernel/crypto/sha256.c",
"chars": 6069,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/crypto/sha256.h",
"chars": 702,
"preview": "#ifndef CRYPTO_SHA256_H_\n#define CRYPTO_SHA256_H_\n\n#include \"crypto/misc.h\"\n\n/* in bytes */\nenum {\n\tSHA256 ="
},
{
"path": "kernel/device.h",
"chars": 325,
"preview": "#ifndef INC_DEVICE\n#define INC_DEVICE\n\n#include \"frosted.h\"\n\nstruct device {\n struct fnode *fno;\n mutex_t * mutex;"
},
{
"path": "kernel/drivers/device.c",
"chars": 1374,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/devusb_cdc_ecm.c",
"chars": 14318,
"preview": "/*\n *\tUSB Ethernet gadget driver\n *\n * This file is part of frosted.\n *\n * frosted is free software: you can r"
},
{
"path": "kernel/drivers/dma.h",
"chars": 317,
"preview": "#ifndef INC_DMA\n#define INC_DMA\n\nstruct dma_config {\n uint32_t base;\n uint8_t stream;\n uint32_t channel;\n ui"
},
{
"path": "kernel/drivers/dsp.h",
"chars": 125,
"preview": "#ifndef INC_DSP\n#define INC_DSP\n\n#ifdef CONFIG_DSP\nint dsp_init(void);\n#else\n# define dsp_init() ((-ENOENT))\n#endif\n\n#e"
},
{
"path": "kernel/drivers/eth.h",
"chars": 438,
"preview": "#ifndef INC_ETH\n#define INC_ETH\n#include \"frosted.h\"\n#include \"gpio.h\"\n\nstruct eth_config {\n const struct gpio_config"
},
{
"path": "kernel/drivers/exti.c",
"chars": 5671,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/exti.h",
"chars": 322,
"preview": "#ifndef INC_STM32F4EXTI\n#define INC_STM32F4EXTI\n#include <unicore-mx/cm3/common.h>\n#include <unicore-mx/stm32/f4/exti.h>"
},
{
"path": "kernel/drivers/fbcon.c",
"chars": 9019,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/fbcon.h",
"chars": 235,
"preview": "#ifndef FBCON_INCLUDED\n#define FBCON_INCLUDED\n\n#include <stdint.h>\n#include \"frosted.h\"\n\n#ifdef CONFIG_DEVFBCON\n/* kerne"
},
{
"path": "kernel/drivers/fonts.h",
"chars": 289,
"preview": "#ifndef INCLUDE_FONT_DEFINITION\n#define INCLUDE_FONT_DEFINITION\n\n#ifdef CONFIG_FONT_7x6\n# define FONT_HEIGHT 7\n# def"
},
{
"path": "kernel/drivers/fortuna.c",
"chars": 9079,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/framebuffer.h",
"chars": 2438,
"preview": "#ifndef FRAMEBUFFER_INCLUDED\n#define FRAMEBUFFER_INCLUDED\n\n#include <stdint.h>\n#include \"frosted.h\"\n#include <sys/froste"
},
{
"path": "kernel/drivers/frand.c",
"chars": 2570,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/ft5336.c",
"chars": 2545,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/gpio.c",
"chars": 18061,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/gpio.h",
"chars": 1166,
"preview": "#ifndef INC_GPIO\n#define INC_GPIO\n#include \"frosted.h\"\n#include \"sys/frosted-io.h\"\n\n\n\n#if defined(STM32F4) || defined(ST"
},
{
"path": "kernel/drivers/i2c.h",
"chars": 1026,
"preview": "#ifndef INC_I2C\n#define INC_I2C\n#include \"dma.h\"\n#include \"gpio.h\"\n\n\nstruct i2c_config {\n int idx;\n uint32_t base;"
},
{
"path": "kernel/drivers/ili9341.c",
"chars": 22353,
"preview": "/* Includes ------------------------------------------------------------------*/\n#include <string.h>\n#include \"malloc.h\""
},
{
"path": "kernel/drivers/l3gd20.c",
"chars": 5783,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/l3gd20.h",
"chars": 323,
"preview": "#ifndef INC_L3GD20\n#define INC_L3GD20\n\nstruct l3gd20_addr {\n const char * name;\n const char * spi_name;\n const "
},
{
"path": "kernel/drivers/lis3dsh.c",
"chars": 6291,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/lis3dsh.h",
"chars": 208,
"preview": "#ifndef LIS3DSH_INC\n#define LIS3DSH_INC\n# ifdef CONFIG_DEVLIS3DSH\n int lis3dsh_init(uint8_t bus, const struct g"
},
{
"path": "kernel/drivers/lm3s_eth.c",
"chars": 3932,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/lsm303dlhc.c",
"chars": 4735,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/lsm303dlhc.h",
"chars": 353,
"preview": "#ifndef INC_LSM303DLHC\n#define INC_LSM303DLHC\n\nstruct lsm303dlhc_addr {\n const char * name;\n const char * i2c_name"
},
{
"path": "kernel/drivers/ltdc.h",
"chars": 129,
"preview": "#ifndef INC_LTDC\n#define INC_LTDC\n\n#ifdef CONFIG_LTDC\nint ltdc_init(void);\n#else\n# define ltdc_init() ((-ENOENT))\n#endi"
},
{
"path": "kernel/drivers/mccog21.c",
"chars": 6276,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/null.c",
"chars": 1968,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/pty.c",
"chars": 10596,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/pty.h",
"chars": 153,
"preview": "#ifndef PTY_H_INCLUDED\n#define PTY_H_INCLUDED\n\n#ifndef CONFIG_PTY_UNIX\n# define ptmx_init() do{}while(0)\n#else\n int"
},
{
"path": "kernel/drivers/rng.h",
"chars": 226,
"preview": "#ifndef RNG_INC\n#define RNG_INC\n#include \"frosted.h\"\n\n#ifdef CONFIG_RNG\n\nint rng_init(void);\nint rng_create(uint32_t bas"
},
{
"path": "kernel/drivers/sdio.h",
"chars": 513,
"preview": "#ifndef INC_SDIO\n#define INC_SDIO\n#include \"frosted.h\"\n#include \"gpio.h\"\n\nstruct sdio_config {\n uint32_t *base;\n u"
},
{
"path": "kernel/drivers/sdram.h",
"chars": 136,
"preview": "#ifndef INC_SDRAM\n#define INC_SDRAM\n\n#if defined CONFIG_SDRAM\nint sdram_init(void);\n#else\n#define sdram_init() (-ENOENT)"
},
{
"path": "kernel/drivers/socket_in.c",
"chars": 27179,
"preview": "#include \"frosted.h\"\n#include \"socket_in.h\"\n#include <string.h>\n#include <sys/types.h>\n#include <net/if.h>\n#include <net"
},
{
"path": "kernel/drivers/socket_in.h",
"chars": 5443,
"preview": "/*********************************************************************\nPicoTCP. Copyright (c) 2013 TASS Belgium NV. Some"
},
{
"path": "kernel/drivers/socket_un.c",
"chars": 2171,
"preview": "#include \"frosted.h\"\n#include <string.h>\n\nstatic struct module mod_socket_un;\nstruct fnode FNO_SOCKUN_STUB = {\n .owne"
},
{
"path": "kernel/drivers/spi.h",
"chars": 870,
"preview": "#ifndef INC_SPI\n#define INC_SPI\n#include \"dma.h\"\n#include \"gpio.h\"\n\nstruct spi_config {\n int idx;\n uint32_t base;\n"
},
{
"path": "kernel/drivers/stm32_dma.c",
"chars": 1721,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32_eth.c",
"chars": 9485,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32_i2c.c",
"chars": 15262,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32_lowpower.c",
"chars": 3764,
"preview": "#include \"frosted.h\"\n#include \"unicore-mx/cm3/nvic.h\"\n#include \"unicore-mx/cm3/systick.h\"\n#include \"unicore-mx/cm3/scb.h"
},
{
"path": "kernel/drivers/stm32_rng.c",
"chars": 4215,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32_sdio.c",
"chars": 26854,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32_sdio.h",
"chars": 1761,
"preview": "#include \"frosted.h\"\n/* this define lets the init code know that you are using a GPIO as a card\n * detect pin */\n#define"
},
{
"path": "kernel/drivers/stm32_spi.c",
"chars": 5503,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32_usb.c",
"chars": 11022,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32f4_adc.c",
"chars": 4585,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32f4_dsp.c",
"chars": 6192,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stm32f4_sdram.c",
"chars": 5539,
"preview": "/*\n * This file is part of the unicore-mx project.\n *\n * Copyright (C) 2014 Chuck McManis <cmcmanis@mcmanis.com>\n * Copy"
},
{
"path": "kernel/drivers/stm32f7_ltdc.c",
"chars": 9271,
"preview": "/* Includes ------------------------------------------------------------------*/\n#include <string.h>\n#include \"malloc.h\""
},
{
"path": "kernel/drivers/stm32f7_sdram.c",
"chars": 5601,
"preview": "/*\n * This file is part of the unicore-mx project.\n *\n * Copyright (C) 2014 Chuck McManis <cmcmanis@mcmanis.com>\n * Copy"
},
{
"path": "kernel/drivers/stmpe811.c",
"chars": 22502,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/stmpe811.h",
"chars": 181,
"preview": "#ifndef INC_STMPE811\n#define INC_STMPE811\n\n#include \"gpio.h\"\n\nstruct ts_config {\n struct gpio_config gpio;\n uint8_"
},
{
"path": "kernel/drivers/tty_console.c",
"chars": 3632,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/tty_console.h",
"chars": 187,
"preview": "\n#ifndef INC_TTY_CONSOLE\n#define INC_TTY_CONSOLE\n#include \"frosted.h\"\n#ifdef CONFIG_DEVTTY_CONSOLE\nint tty_console_init("
},
{
"path": "kernel/drivers/uart.c",
"chars": 12937,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/uart.h",
"chars": 672,
"preview": "#ifndef INC_UART\r\n#define INC_UART\r\n\r\n#include \"frosted.h\"\r\n#include \"gpio.h\"\r\n\r\n/* TX, RX, RTS, CTS, CK*/\r\n#define MAX_"
},
{
"path": "kernel/drivers/uart_dev.h",
"chars": 1165,
"preview": "#ifndef UART_DEV_INCLUDE /* <--- keep the same name for guard across archs for compile-time sanity */\n#define UART_DEV_I"
},
{
"path": "kernel/drivers/usb/usb_kbd.c",
"chars": 11032,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/drivers/usb/usbh_drivers.h",
"chars": 280,
"preview": "#include \"frosted.h\"\n#include \"device.h\"\n#ifndef USBH_DRIVERS_H\n#define USBH_DRIVERS_H\n\n/* Put your driver initalizers h"
},
{
"path": "kernel/drivers/usb.h",
"chars": 1931,
"preview": "#ifndef INC_USB\n#define INC_USB\n#include \"frosted.h\"\n#include \"gpio.h\"\n#include <unicore-mx/usbd/usbd.h>\n#include <unico"
},
{
"path": "kernel/drivers/xadow_LED_5x7.c",
"chars": 3097,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fonts/cga_8x8.c",
"chars": 21692,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fonts/palette_256_xterm.c",
"chars": 2747,
"preview": "#include <stdint.h>\n\nconst uint32_t xterm_cmap[256] = {\n 0x000000, 0x800000, 0x008000, 0x808000, 0x000080, 0x800080, "
},
{
"path": "kernel/fonts/piccolo_7x6.c",
"chars": 12405,
"preview": "const unsigned long font_height = 7;\nconst unsigned long font_width = 6;\nconst unsigned char fb_font[256][7] = {\n {0"
},
{
"path": "kernel/fortuna.h",
"chars": 606,
"preview": "#ifndef FORTUNA_H_\n#define FORTUNA_H_\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n\n/* Defines for hash "
},
{
"path": "kernel/fpb.c",
"chars": 2584,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fpb.h",
"chars": 1002,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/framebuffer.c",
"chars": 5181,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/frand.h",
"chars": 637,
"preview": "#ifndef FRAND_H_\n#define FRAND_H_\n\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n\n#include \"frosted.h\"\n\nst"
},
{
"path": "kernel/frosted.c",
"chars": 7424,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/frosted.h",
"chars": 10577,
"preview": "#ifndef FROSTED_INCLUDED_H\n#define FROSTED_INCLUDED_H\n\n#define KERNEL\n#include \"frosted_api.h\"\n#include \"malloc.h\"\n#incl"
},
{
"path": "kernel/fs/fatfs.c",
"chars": 22417,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fs/fatfs.h",
"chars": 177,
"preview": "#include \"frosted.h\"\r\n\r\n#ifndef FATFS_INC\r\n#define FATFS_INC\r\n\r\n\r\n#ifdef CONFIG_FATFS\r\n\r\nint fatfs_init(void);\r\n\r\n#else\r"
},
{
"path": "kernel/fs/memfs.c",
"chars": 5068,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fs/sysfs.c",
"chars": 21151,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fs/xipfs.c",
"chars": 5675,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/fs/xipfs.h",
"chars": 351,
"preview": "#ifndef XIPFS_INCLUDED\n#define XIPFS_INCLUDED\n#define XIPFS_MAGIC 0xC519FF55\n\n#include <stdint.h>\n\nstruct xipfs_fat {\n "
},
{
"path": "kernel/getaddrinfo.c",
"chars": 8190,
"preview": "/* \n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n *"
},
{
"path": "kernel/hardfault_debug.c",
"chars": 3631,
"preview": "/**\r\n * HardFault_HandlerAsm:\r\n * Alternative Hard Fault handler to help debug the reason for a fault.\r\n * To use, edit "
},
{
"path": "kernel/heap.h",
"chars": 10256,
"preview": "\n#include <stdint.h>\n#include <stdlib.h>\n#include <string.h>\n\n#define DECLARE_HEAP(type, orderby) "
},
{
"path": "kernel/interrupts.h",
"chars": 746,
"preview": "\n#ifndef FROSTED_INTERRUPTS_H\n#define FROSTED_INTERRUPTS_H\n\nextern void __set_BASEPRI(int);\n\n#ifdef DEBUG\n static voi"
},
{
"path": "kernel/kprintf.c",
"chars": 6907,
"preview": "/*\n * frosted - printf() library function\n *\n Based on Georges Menie's printf -\n Copyright 2001, 2002 Georges Menie (ww"
},
{
"path": "kernel/kprintf.h",
"chars": 233,
"preview": "#ifndef KPRINTF_H\n#define KPRINTF_H\n\n#ifdef CONFIG_KLOG\nint klog_init(void);\nint ksprintf(char *out, const char *format,"
},
{
"path": "kernel/lm3s/Kconfig",
"chars": 268,
"preview": "if ARCH_LM3S\n\nchoice \n prompt \"MCU\"\n default LM3S6965\nconfig ARCH_LM3S6965\n bool \"LM3S6965\"\n select FLASH_SI"
},
{
"path": "kernel/lm3s/lm3s.c",
"chars": 0,
"preview": ""
},
{
"path": "kernel/lm3s/lm3s.ld.in",
"chars": 1808,
"preview": "/******************************************************************************\n *\n * standalone.ld - Linker script for "
},
{
"path": "kernel/lm3s/lm3s6965evb.c",
"chars": 2673,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/locks.c",
"chars": 8062,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/locks.h",
"chars": 236,
"preview": "#include \"frosted.h\"\n/* Structures */\nstruct semaphore {\n int value;\n uint32_t signature;\n int listeners;\n i"
},
{
"path": "kernel/lowpower.h",
"chars": 262,
"preview": "#ifndef LOWPOWER_H_INC\n#define LOWPOWER_H_INC\n#include <stdint.h>\n\n#ifndef CONFIG_LOWPOWER\n# define lowpower_init() (-"
},
{
"path": "kernel/lpc17xx/Kconfig",
"chars": 860,
"preview": "if ARCH_LPC17XX\n\nchoice \n prompt \"MCU\"\n default ARCH_LPC1768\nconfig ARCH_LPC1763\n bool \"LPC1763\"\n select FLA"
},
{
"path": "kernel/lpc17xx/lpc1768mbed.c",
"chars": 5301,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/lpc17xx/lpc1769xpresso.c",
"chars": 4714,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/lpc17xx/lpc17xx.ld.in",
"chars": 1865,
"preview": "MEMORY\r\n{\r\n FLASH (rx) : ORIGIN = __FLASH_ORIGIN, LENGTH = __KFLASHMEM_SIZE\r\n SRAM (rwx) : ORIGIN = __RAM1_BASE, L"
},
{
"path": "kernel/lpc17xx.h",
"chars": 214,
"preview": "#ifndef INC_LPC17CC\n#define INC_LPC17CC\n\n#ifdef CONFIG_DEVUART\n#include \"uart.h\"\n#endif\n\n#ifdef CONFIG_DEVUART\nvoid uart"
},
{
"path": "kernel/malloc.c",
"chars": 22774,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/malloc.h",
"chars": 853,
"preview": "#ifndef _FROSTED_MALLOC_H\n#define _FROSTED_MALLOC_H\n\n#include \"string.h\"\n#include \"stdint.h\"\n\n#define MEM_KERNEL 0\n#defi"
},
{
"path": "kernel/module.c",
"chars": 7003,
"preview": "/* \n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n *"
},
{
"path": "kernel/mpu.c",
"chars": 5537,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/mpu.h",
"chars": 214,
"preview": "#ifndef FROSTED_MPU_H\n#define FROSTED_MPU_H\n\n#ifdef CONFIG_MPU\nvoid mpu_init(void);\nvoid mpu_task_on(void *stack);\n#else"
},
{
"path": "kernel/mutex.S",
"chars": 2460,
"preview": "\n.syntax unified\n\n/* Lock function.\n * On success, return 0. \n * On failure, return -1 (Locked, try again later).\n */\n\n."
},
{
"path": "kernel/net/Kconfig",
"chars": 809,
"preview": "if PICOTCP \n\nmenu \"picoTCP configuration\"\n\nconfig CONFIG_PICOTCP_IPV4\n bool \"Support for IP version 4\"\n default y\n"
},
{
"path": "kernel/net/if.h",
"chars": 11287,
"preview": "/*\n * Copyright (c) 1982, 1986, 1989, 1993\n *\tThe Regents of the University of California. All rights reserved.\n *\n * R"
},
{
"path": "kernel/net/pico_lock.c",
"chars": 594,
"preview": "#include \"frosted.h\"\n#include \"locks.h\"\n\nstatic mutex_t *picotcp_lock = NULL;\nvoid pico_lock_init(void)\n{\n if (!picot"
},
{
"path": "kernel/net/route.h",
"chars": 2505,
"preview": "#ifndef NET_ROUTE_H\n#define NET_ROUTE_H\n#include <frosted.h>\n#include <stdint.h>\n\n\nstruct rtentry {\n\tunsigned long int r"
},
{
"path": "kernel/nrf51/Kconfig",
"chars": 1488,
"preview": "if ARCH_NRF51\n\nchoice\n prompt \"MCU\"\n default ARCH_NRF51822_QFAC\n\nconfig ARCH_NRF51822_QFAA\n bool \"NRF51822_QFAA"
},
{
"path": "kernel/nrf51/blenanov1_5.c",
"chars": 1658,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/nrf51/nrf51.ld.in",
"chars": 1643,
"preview": "MEMORY\n{\n FLASH (rx) : ORIGIN = __FLASH_ORIGIN, LENGTH = __KFLASHMEM_SIZE\n SRAM (rwx) : ORIGIN = __RAM1_BASE, LENG"
},
{
"path": "kernel/nrf52/Kconfig",
"chars": 396,
"preview": "if ARCH_NRF52\n\nchoice\n prompt \"MCU\"\n default ARCH_NRF52832\n\nconfig ARCH_NRF52840\n bool \"NRF52840 1MB/512KB\"\n "
},
{
"path": "kernel/nrf52/blenanov2_0.c",
"chars": 1660,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/nrf52/nrf52.ld.in",
"chars": 1643,
"preview": "MEMORY\n{\n FLASH (rx) : ORIGIN = __FLASH_ORIGIN, LENGTH = __KFLASHMEM_SIZE\n SRAM (rwx) : ORIGIN = __RAM1_BASE, LENG"
},
{
"path": "kernel/null.h",
"chars": 82,
"preview": "#ifndef INC_NULL\n#define INC_NULL\n\nvoid devnull_init(struct fnode *dev);\n\n#endif\n\n"
},
{
"path": "kernel/pico_port.h",
"chars": 863,
"preview": "#ifndef PICO_PORT_FROSTED_INCLUDED\n#define PICO_PORT_FROSTED_INCLUDED\n#define PICO_SUPPORT_MUTEX\n\n#ifdef FROSTED\n#includ"
},
{
"path": "kernel/pipe.c",
"chars": 5690,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/scheduler.c",
"chars": 83249,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/scheduler.h",
"chars": 83,
"preview": "#ifndef INCLUDED_SCHEDULER_H\n#define INCLUDED_SCHEDULER_H\n#include \"vfs.h\"\n\n#endif\n"
},
{
"path": "kernel/semaphore.S",
"chars": 2325,
"preview": "\n.syntax unified\n\n/* Try to decrease the semaphore. \n * On success, return 0. \n * On failure, return -1 (sem == 0, try a"
},
{
"path": "kernel/stm32f4/Kconfig",
"chars": 1954,
"preview": "if ARCH_STM32F4\n\nchoice \n prompt \"MCU\"\n default ARCH_STM32F407_XG\n\nconfig ARCH_STM32F401_XB\n bool \"STM32F401xB "
},
{
"path": "kernel/stm32f4/stm32f4.ld.in",
"chars": 2017,
"preview": "MEMORY\n{\n FLASH (rx) : ORIGIN = __FLASH_ORIGIN, LENGTH = __KFLASHMEM_SIZE\n SRAM (rwx) : ORIGIN = __RAM1_BASE, LENG"
},
{
"path": "kernel/stm32f4/stm32f407discovery.c",
"chars": 16097,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/stm32f4/stm32f407diymore.c",
"chars": 10545,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/stm32f4/stm32f411nucleo.c",
"chars": 14823,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/stm32f4/stm32f429discovery.c",
"chars": 7629,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/stm32f4/stm32f446nucleo.c",
"chars": 9341,
"preview": "/*\n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n * "
},
{
"path": "kernel/stm32f4/stm32f4x1discovery.c",
"chars": 11989,
"preview": "/* \n * This file is part of frosted.\n *\n * frosted is free software: you can redistribute it and/or modify\n *"
}
]
// ... and 24 more files (download for full content)
About this extraction
This page contains the full source code of the insane-adding-machines/frosted GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 224 files (1.5 MB), approximately 499.6k tokens, and a symbol index with 2338 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.