drivers/am335xgpio: Add AM335x driver for bitbang support on BeagleBones
[fw/openocd] / src / jtag / drivers / versaloon / versaloon_internal.h
index c7c73b60ce93feae6b043592c305587ed6480c94..8372970b1dda5147fb5ac5f1ab1990aa71919c9b 100644 (file)
  *   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.,                                       *
- *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
-#ifndef __VERSALOON_INTERNAL_H_INCLUDED__
-#define __VERSALOON_INTERNAL_H_INCLUDED__
+
+#ifndef OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
+#define OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H
 
 #define VERSALOON_PRODUCTSTRING_INDEX  2
 #define VERSALOON_SERIALSTRING_INDEX   3
@@ -37,8 +36,8 @@
 #define VERSALOON_TIMEOUT                              5000
 #define VERSALOON_TIMEOUT_LONG                 60000
 
-// USB Commands
-// Common Commands
+/* USB Commands */
+/* Common Commands */
 #define VERSALOON_COMMON_CMD_START             0x00
 #define VERSALOON_COMMON_CMD_END               0x0F
 
 #define VERSALOON_FW_UPDATE                            0x0F
 #define VERSALOON_FW_UPDATE_KEY                        0xAA
 
-// MCU Command
+/* MCU Command */
 #define VERSALOON_MCU_CMD_START                        0x10
 #define VERSALOON_MCU_CMD_END                  0x1F
 
-// USB_TO_XXX Command
+/* USB_TO_XXX Command */
 #define VERSALOON_USB_TO_XXX_CMD_START 0x20
 #define VERSALOON_USB_TO_XXX_CMD_END   0x7F
 
-// VSLLink Command
+/* VSLLink Command */
 #define VERSALOON_VSLLINK_CMD_START            0x80
 #define VERSALOON_VSLLINK_CMD_END              0xFF
 
-
-
-// Mass-product
+/* Mass-product */
 #define MP_OK                                                  0x00
 #define MP_FAIL                                                        0x01
 
 #define MP_ISSP                                                        0x11
 
-
-
-// pending struct
+/* pending struct */
 #define VERSALOON_MAX_PENDING_NUMBER   4096
-typedef RESULT (*versaloon_callback_t)(void *, uint8_t *, uint8_t *);
-struct versaloon_want_pos_t
-{
+typedef RESULT(*versaloon_callback_t)(void *, uint8_t *, uint8_t *);
+struct versaloon_want_pos_t {
        uint16_t offset;
        uint16_t size;
        uint8_t *buff;
        struct versaloon_want_pos_t *next;
 };
-struct versaloon_pending_t
-{
+struct versaloon_pending_t {
        uint8_t type;
        uint8_t cmd;
        uint16_t want_data_pos;
@@ -98,15 +91,15 @@ struct versaloon_pending_t
        void *extra_data;
        versaloon_callback_t callback;
 };
-extern struct versaloon_pending_t \
-                                                       versaloon_pending[VERSALOON_MAX_PENDING_NUMBER];
+extern struct versaloon_pending_t
+       versaloon_pending[VERSALOON_MAX_PENDING_NUMBER];
 extern uint16_t versaloon_pending_idx;
 void versaloon_set_pending_id(uint32_t id);
 void versaloon_set_callback(versaloon_callback_t callback);
-void versaloon_set_extra_data(void * p);
+void versaloon_set_extra_data(void *p);
 RESULT versaloon_add_want_pos(uint16_t offset, uint16_t size, uint8_t *buff);
 RESULT versaloon_add_pending(uint8_t type, uint8_t cmd, uint16_t actual_szie,
-       uint16_t want_pos, uint16_t want_size, uint8_t *buffer, uint8_t collect);
+               uint16_t want_pos, uint16_t want_size, uint8_t *buffer, uint8_t collect);
 void versaloon_free_want_pos(void);
 
 RESULT versaloon_send_command(uint16_t out_len, uint16_t *inlen);
@@ -114,5 +107,4 @@ extern uint8_t *versaloon_buf;
 extern uint8_t *versaloon_cmd_buf;
 extern uint16_t versaloon_buf_size;
 
-#endif /* __VERSALOON_INTERNAL_H_INCLUDED__ */
-
+#endif /* OPENOCD_JTAG_DRIVERS_VERSALOON_VERSALOON_INTERNAL_H */