Skip to content

Commit

Permalink
Merge pull request ChibiOS#317 from SonixQMK/sn32_master_2.11
Browse files Browse the repository at this point in the history
Sonix SN32 series support
  • Loading branch information
fpoussin committed Apr 18, 2022
2 parents 934631a + e201116 commit e775cbb
Show file tree
Hide file tree
Showing 162 changed files with 48,271 additions and 0 deletions.
63 changes: 63 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F200_Def.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#ifndef __SN32F200_DEF_H
#define __SN32F200_DEF_H

/*_____ I N C L U D E S ____________________________________________________*/

/*_____ D E F I N I T I O N S ______________________________________________*/

//Ture or False
// #define TRUE 0x1
// #define FALSE 0x0

//Enable or Disable
#define ENABLE 0x1
#define DISABLE 0x0

//Error Status
#define OK 0x0
#define FAIL 0x1

//Null
// #define NULL 0

//Interrupt Flag Parsing Method
#define POLLING_METHOD 0x0
#define INTERRUPT_METHOD 0x1

//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
//SN32F230_PKG
#define SN32F239 0
#define SN32F238 1
#define SN32F237 2
#define SN32F236 3
#define SN32F235 4

//SN32F240_PKG
#define SN32F249 0
#define SN32F248 1
#define SN32F247 2
#define SN32F246 3
#define SN32F245 4

//SN32F240B_PKG
#define SN32F248B 0
#define SN32F247B 1
#define SN32F246B 2
#define SN32F2451B 3

//SN32F260_PKG
#define SN32F268 0
#define SN32F267 1
#define SN32F265 2
#define SN32F2641 3
#define SN32F264 4
#define SN32F263 5
//;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

/*_____ M A C R O S ________________________________________________________*/


/*_____ D E C L A R A T I O N S ____________________________________________*/


#endif /*__SN32F200_DEF_H*/
3,279 changes: 3,279 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F240.h

Large diffs are not rendered by default.

2,914 changes: 2,914 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F240B.h

Large diffs are not rendered by default.

2,617 changes: 2,617 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F260.h

Large diffs are not rendered by default.

2,211 changes: 2,211 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F260_defines.h

Large diffs are not rendered by default.

4,896 changes: 4,896 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F280.h

Large diffs are not rendered by default.

4,896 changes: 4,896 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F290.h

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions os/common/ext/SONiX/SN32F2xx/SN32F2xx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#ifndef __SN32F2xx_H
#define __SN32F2xx_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/** @addtogroup Library_configuration_section
* @{
*/

/**
* @brief SN32 Family
*/
#if !defined (SN32F2)
#define SN32F2
#endif /* SN32F2 */

/* Uncomment the line below according to the target SN32 device used in your
application
*/

#if !defined (SN32F240) && !defined (SN32F240B) && !defined (SN32F260) \
&& !defined (SN32F280) && !defined (SN32F290)
/* #define SN32F230 */ /*!< SN32F239, SN32F238, SN32F237, SN32F236,and SN32F235 Devices */
/* #define SN32F240 */ /*!< SN32F249, SN32F248, SN32F247, SN32F246 and SN32F245 Devices */
/* #define SN32F240B */ /*!< SN32F248B, SN32F247B, SN32F246B and SN32F2451B Devices */
/* #define SN32F260 */ /*!< SN32F268, SN32F267, SN32F265, SN32F2641,
SN32F264 and SN32F263 Devices */
/* #define SN32F280 */ /*!< SN32F289, SN32F288 and SN32F287 Devices */
/* #define SN32F290 */ /*!< SN32F299. SN32F298 and SN32F297 Devices */
#include "board.h"
#endif

/** @addtogroup Device_Included
* @{
*/

#if defined(SN32F240)
#include "SN32F240.h"
#elif defined(SN32F240B)
#include "SN32F240B.h"
#elif defined(SN32F260)
#include "SN32F260.h"
#elif defined(SN32F280)
#include "SN32F280.h"
#elif defined(SN32F290)
#include "SN32F290.h"
#else
#error "Please select first the target SN32F2xx device used in your application (in SN32F2xx.h file)"
#endif

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /*__SN32F2xx_H*/

0 comments on commit e775cbb

Please sign in to comment.