/* ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio. This file is part of ChibiOS. ChibiOS 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 3 of the License, or (at your option) any later version. ChibiOS 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, see . */ /** * @file chmboxes.h * @brief Mailboxes macros and structures. * * @addtogroup oslib_mailboxes * @{ */ #ifndef CHMBOXES_H #define CHMBOXES_H #if (CH_CFG_USE_MAILBOXES == TRUE) || defined(__DOXYGEN__) /*===========================================================================*/ /* Module constants. */ /*===========================================================================*/ /*===========================================================================*/ /* Module pre-compile time settings. */ /*===========================================================================*/ /*===========================================================================*/ /* Derived constants and error checks. */ /*===========================================================================*/ /*===========================================================================*/ /* Module data structures and types. */ /*===========================================================================*/ /** * @brief Structure representing a mailbox object. */ typedef struct { msg_t *buffer; /**< @brief Pointer to the mailbox buffer. */ msg_t *top; /**< @brief Pointer to the location after the buffer. */ msg_t *wrptr; /**< @brief Write pointer. */ msg_t *rdptr; /**< @brief Read pointer. */ size_t cnt; /**< @brief Messages in queue. */ bool reset; /**< @brief True in reset state. */ threads_queue_t qw; /**< @brief Queued writers. */ threads_queue_t qr; /**< @brief Queued readers. */ } mailbox_t; /*===========================================================================*/ /* Module macros. */ /*===========================================================================*/ /** * @brief Data part of a static mailbox initializer. * @details This macro should be used when statically initializing a * mailbox that is part of a bigger structure. * * @param[in] name the name of the mailbox variable * @param[in] buffer pointer to the mailbox buffer array of @p msg_t * @param[in] size number of @p msg_t elements in the buffer array */ #define _MAILBOX_DATA(name, buffer, size) { \ (msg_t *)(buffer), \ (msg_t *)(buffer) + size, \ (msg_t *)(buffer), \ (msg_t *)(buffer), \ (size_t)0, \ false, \ _THREADS_QUEUE_DATA(name.qw), \ _THREADS_QUEUE_DATA(name.qr), \ } /** * @brief Static mailbox initializer. * @details Statically initialized mailboxes require no explicit * initialization using @p chMBObjectInit(). * * @param[in] name the name of the mailbox variable * @param[in] buffer pointer to the mailbox buffer array of @p msg_t * @param[in] size number of @p msg_t elements in the buffer array */ #define MAILBOX_DECL(name, buffer, size) \ mailbox_t name = _MAILBOX_DATA(name, buffer, size) /*================================================
/*
             LUFA Library
     Copyright (C) Dean Camera, 2017.

  dean [at] fourwalledcubicle [dot] com
           www.lufa-lib.org
*/

/*
  Copyright 2017  Dean Camera (dean [at] fourwalledcubicle [dot] com)

  Permission to use, copy, modify, distribute, and sell this
  software and its documentation for any purpose is hereby granted
  without fee, provided that the above copyright notice appear in
  all copies and that both that the copyright notice and this
  permission notice and warranty disclaimer appear in supporting
  documentation, and that the name of the author not be used in
  advertising or publicity pertaining to distribution of the
  software without specific, written prior permission.

  The author disclaims all warranties with regard to this
  software, including all implied warranties of merchantability
  and fitness.  In no event shall the author be liable for any
  special, indirect or consequential damages or any damages
  whatsoever resulting from loss of use, data or profits, whether
  in an action of contract, negligence or other tortious action,
  arising out of or in connection with the use or performance of
  this software.
*/

.section .text


# Mandatory entry point for successful compilation and link
.global main
main:


# Mandatory callback needed for base compile of the USB driver
.global CALLBACK_USB_GetDescriptor
CALLBACK_USB_GetDescriptor: